(0) Obligation:

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

p(0) → s(s(0))
p(s(x)) → x
p(p(s(x))) → p(x)
le(p(s(x)), x) → le(x, x)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, y) → if(le(x, y), x, y)
if(true, x, y) → 0
if(false, x, y) → s(minus(p(x), y))

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:

P(p(s(x))) → P(x)
LE(p(s(x)), x) → LE(x, x)
LE(s(x), s(y)) → LE(x, y)
MINUS(x, y) → IF(le(x, y), x, y)
MINUS(x, y) → LE(x, y)
IF(false, x, y) → MINUS(p(x), y)
IF(false, x, y) → P(x)

The TRS R consists of the following rules:

p(0) → s(s(0))
p(s(x)) → x
p(p(s(x))) → p(x)
le(p(s(x)), x) → le(x, x)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, y) → if(le(x, y), x, y)
if(true, x, y) → 0
if(false, x, y) → s(minus(p(x), y))

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 3 SCCs with 2 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

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

LE(s(x), s(y)) → LE(x, y)
LE(p(s(x)), x) → LE(x, x)

The TRS R consists of the following rules:

p(0) → s(s(0))
p(s(x)) → x
p(p(s(x))) → p(x)
le(p(s(x)), x) → le(x, x)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, y) → if(le(x, y), x, y)
if(true, x, y) → 0
if(false, x, y) → s(minus(p(x), y))

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

(6) UsableRulesProof (EQUIVALENT transformation)

We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.

(7) Obligation:

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

LE(s(x), s(y)) → LE(x, y)
LE(p(s(x)), x) → LE(x, x)

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

(8) 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:

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

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

(9) TRUE

(10) Obligation:

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

P(p(s(x))) → P(x)

The TRS R consists of the following rules:

p(0) → s(s(0))
p(s(x)) → x
p(p(s(x))) → p(x)
le(p(s(x)), x) → le(x, x)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, y) → if(le(x, y), x, y)
if(true, x, y) → 0
if(false, x, y) → s(minus(p(x), y))

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

(11) UsableRulesProof (EQUIVALENT transformation)

We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.

(12) Obligation:

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

P(p(s(x))) → P(x)

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

(13) 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:

  • P(p(s(x))) → P(x)
    The graph contains the following edges 1 > 1

(14) TRUE

(15) Obligation:

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

IF(false, x, y) → MINUS(p(x), y)
MINUS(x, y) → IF(le(x, y), x, y)

The TRS R consists of the following rules:

p(0) → s(s(0))
p(s(x)) → x
p(p(s(x))) → p(x)
le(p(s(x)), x) → le(x, x)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, y) → if(le(x, y), x, y)
if(true, x, y) → 0
if(false, x, y) → s(minus(p(x), y))

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

(16) MNOCProof (EQUIVALENT transformation)

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

(17) Obligation:

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

IF(false, x, y) → MINUS(p(x), y)
MINUS(x, y) → IF(le(x, y), x, y)

The TRS R consists of the following rules:

p(0) → s(s(0))
p(s(x)) → x
p(p(s(x))) → p(x)
le(p(s(x)), x) → le(x, x)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, y) → if(le(x, y), x, y)
if(true, x, y) → 0
if(false, x, y) → s(minus(p(x), y))

The set Q consists of the following terms:

p(0)
p(s(x0))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)

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

(18) 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.

(19) Obligation:

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

IF(false, x, y) → MINUS(p(x), y)
MINUS(x, y) → IF(le(x, y), x, y)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(0) → s(s(0))
p(s(x)) → x

The set Q consists of the following terms:

p(0)
p(s(x0))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)

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

(20) 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, x1)
if(true, x0, x1)
if(false, x0, x1)

(21) Obligation:

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

IF(false, x, y) → MINUS(p(x), y)
MINUS(x, y) → IF(le(x, y), x, y)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(0) → s(s(0))
p(s(x)) → x

The set Q consists of the following terms:

p(0)
p(s(x0))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(22) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule MINUS(x, y) → IF(le(x, y), x, y) at position [0] we obtained the following new rules [LPAR04]:

MINUS(0, x0) → IF(true, 0, x0)
MINUS(s(x0), 0) → IF(false, s(x0), 0)
MINUS(s(x0), s(x1)) → IF(le(x0, x1), s(x0), s(x1))

(23) Obligation:

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

IF(false, x, y) → MINUS(p(x), y)
MINUS(0, x0) → IF(true, 0, x0)
MINUS(s(x0), 0) → IF(false, s(x0), 0)
MINUS(s(x0), s(x1)) → IF(le(x0, x1), s(x0), s(x1))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(0) → s(s(0))
p(s(x)) → x

The set Q consists of the following terms:

p(0)
p(s(x0))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(24) DependencyGraphProof (EQUIVALENT transformation)

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

(25) Obligation:

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

MINUS(s(x0), 0) → IF(false, s(x0), 0)
IF(false, x, y) → MINUS(p(x), y)
MINUS(s(x0), s(x1)) → IF(le(x0, x1), s(x0), s(x1))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(0) → s(s(0))
p(s(x)) → x

The set Q consists of the following terms:

p(0)
p(s(x0))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(26) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule IF(false, x, y) → MINUS(p(x), y) at position [0] we obtained the following new rules [LPAR04]:

IF(false, 0, y1) → MINUS(s(s(0)), y1)
IF(false, s(x0), y1) → MINUS(x0, y1)

(27) Obligation:

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

MINUS(s(x0), 0) → IF(false, s(x0), 0)
MINUS(s(x0), s(x1)) → IF(le(x0, x1), s(x0), s(x1))
IF(false, 0, y1) → MINUS(s(s(0)), y1)
IF(false, s(x0), y1) → MINUS(x0, y1)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(0) → s(s(0))
p(s(x)) → x

The set Q consists of the following terms:

p(0)
p(s(x0))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(28) DependencyGraphProof (EQUIVALENT transformation)

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

(29) Obligation:

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

IF(false, s(x0), y1) → MINUS(x0, y1)
MINUS(s(x0), 0) → IF(false, s(x0), 0)
MINUS(s(x0), s(x1)) → IF(le(x0, x1), s(x0), s(x1))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
p(0) → s(s(0))
p(s(x)) → x

The set Q consists of the following terms:

p(0)
p(s(x0))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(30) 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.

(31) Obligation:

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

IF(false, s(x0), y1) → MINUS(x0, y1)
MINUS(s(x0), 0) → IF(false, s(x0), 0)
MINUS(s(x0), s(x1)) → IF(le(x0, x1), s(x0), s(x1))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

p(0)
p(s(x0))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(32) 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(0)
p(s(x0))

(33) Obligation:

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

IF(false, s(x0), y1) → MINUS(x0, y1)
MINUS(s(x0), 0) → IF(false, s(x0), 0)
MINUS(s(x0), s(x1)) → IF(le(x0, x1), s(x0), s(x1))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(34) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF(false, s(x0), y1) → MINUS(x0, y1) we obtained the following new rules [LPAR04]:

IF(false, s(z0), 0) → MINUS(z0, 0)
IF(false, s(z0), s(z1)) → MINUS(z0, s(z1))

(35) Obligation:

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

MINUS(s(x0), 0) → IF(false, s(x0), 0)
MINUS(s(x0), s(x1)) → IF(le(x0, x1), s(x0), s(x1))
IF(false, s(z0), 0) → MINUS(z0, 0)
IF(false, s(z0), s(z1)) → MINUS(z0, s(z1))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(36) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs.

(37) Complex Obligation (AND)

(38) Obligation:

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

IF(false, s(z0), s(z1)) → MINUS(z0, s(z1))
MINUS(s(x0), s(x1)) → IF(le(x0, x1), s(x0), s(x1))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(39) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF(false, s(z0), s(z1)) → MINUS(z0, s(z1)) we obtained the following new rules [LPAR04]:

IF(false, s(s(y_0)), s(x1)) → MINUS(s(y_0), s(x1))

(40) Obligation:

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

MINUS(s(x0), s(x1)) → IF(le(x0, x1), s(x0), s(x1))
IF(false, s(s(y_0)), s(x1)) → MINUS(s(y_0), s(x1))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(41) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule MINUS(s(x0), s(x1)) → IF(le(x0, x1), s(x0), s(x1)) we obtained the following new rules [LPAR04]:

MINUS(s(s(y_1)), s(x1)) → IF(le(s(y_1), x1), s(s(y_1)), s(x1))

(42) Obligation:

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

IF(false, s(s(y_0)), s(x1)) → MINUS(s(y_0), s(x1))
MINUS(s(s(y_1)), s(x1)) → IF(le(s(y_1), x1), s(s(y_1)), s(x1))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(43) 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(s(s(y_1)), s(x1)) → IF(le(s(y_1), x1), s(s(y_1)), s(x1))
    The graph contains the following edges 1 >= 2, 2 >= 3

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

(44) TRUE

(45) Obligation:

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

IF(false, s(z0), 0) → MINUS(z0, 0)
MINUS(s(x0), 0) → IF(false, s(x0), 0)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(46) 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.

(47) Obligation:

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

IF(false, s(z0), 0) → MINUS(z0, 0)
MINUS(s(x0), 0) → IF(false, s(x0), 0)

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

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(48) 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].

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

(49) Obligation:

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

IF(false, s(z0), 0) → MINUS(z0, 0)
MINUS(s(x0), 0) → IF(false, s(x0), 0)

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

(50) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF(false, s(z0), 0) → MINUS(z0, 0) we obtained the following new rules [LPAR04]:

IF(false, s(s(y_0)), 0) → MINUS(s(y_0), 0)

(51) Obligation:

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

MINUS(s(x0), 0) → IF(false, s(x0), 0)
IF(false, s(s(y_0)), 0) → MINUS(s(y_0), 0)

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

(52) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule MINUS(s(x0), 0) → IF(false, s(x0), 0) we obtained the following new rules [LPAR04]:

MINUS(s(s(y_0)), 0) → IF(false, s(s(y_0)), 0)

(53) Obligation:

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

IF(false, s(s(y_0)), 0) → MINUS(s(y_0), 0)
MINUS(s(s(y_0)), 0) → IF(false, s(s(y_0)), 0)

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

(54) 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(s(s(y_0)), 0) → IF(false, s(s(y_0)), 0)
    The graph contains the following edges 1 >= 2, 2 >= 3

  • IF(false, s(s(y_0)), 0) → MINUS(s(y_0), 0)
    The graph contains the following edges 2 > 1, 3 >= 2

(55) TRUE