(0) Obligation:

Q restricted rewrite system:
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)
minus(x, 0) → x
minus(0, s(y)) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
mod(s(x), 0) → 0
mod(x, s(y)) → help(x, s(y), 0)
help(x, s(y), c) → if(le(c, x), x, s(y), c)
if(true, x, s(y), c) → help(x, s(y), plus(c, s(y)))
if(false, x, s(y), c) → minus(x, minus(c, s(y)))

Q is empty.

(1) Overlay + Local Confluence (EQUIVALENT transformation)

The TRS is overlay and locally confluent. By [NOC] we can switch to innermost.

(2) Obligation:

Q restricted rewrite system:
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)
minus(x, 0) → x
minus(0, s(y)) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
mod(s(x), 0) → 0
mod(x, s(y)) → help(x, s(y), 0)
help(x, s(y), c) → if(le(c, x), x, s(y), c)
if(true, x, s(y), c) → help(x, s(y), plus(c, s(y)))
if(false, x, s(y), c) → minus(x, minus(c, s(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, s(x0))
minus(s(x0), s(x1))
plus(x0, 0)
plus(x0, s(x1))
mod(s(x0), 0)
mod(x0, s(x1))
help(x0, s(x1), x2)
if(true, x0, s(x1), x2)
if(false, x0, s(x1), x2)

(3) DependencyPairsProof (EQUIVALENT transformation)

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

(4) Obligation:

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

LE(s(x), s(y)) → LE(x, y)
MINUS(s(x), s(y)) → MINUS(x, y)
PLUS(x, s(y)) → PLUS(x, y)
MOD(x, s(y)) → HELP(x, s(y), 0)
HELP(x, s(y), c) → IF(le(c, x), x, s(y), c)
HELP(x, s(y), c) → LE(c, x)
IF(true, x, s(y), c) → HELP(x, s(y), plus(c, s(y)))
IF(true, x, s(y), c) → PLUS(c, s(y))
IF(false, x, s(y), c) → MINUS(x, minus(c, s(y)))
IF(false, x, s(y), c) → MINUS(c, s(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)
minus(x, 0) → x
minus(0, s(y)) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
mod(s(x), 0) → 0
mod(x, s(y)) → help(x, s(y), 0)
help(x, s(y), c) → if(le(c, x), x, s(y), c)
if(true, x, s(y), c) → help(x, s(y), plus(c, s(y)))
if(false, x, s(y), c) → minus(x, minus(c, s(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, s(x0))
minus(s(x0), s(x1))
plus(x0, 0)
plus(x0, s(x1))
mod(s(x0), 0)
mod(x0, s(x1))
help(x0, s(x1), x2)
if(true, x0, s(x1), x2)
if(false, x0, s(x1), x2)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

PLUS(x, s(y)) → PLUS(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)
minus(x, 0) → x
minus(0, s(y)) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
mod(s(x), 0) → 0
mod(x, s(y)) → help(x, s(y), 0)
help(x, s(y), c) → if(le(c, x), x, s(y), c)
if(true, x, s(y), c) → help(x, s(y), plus(c, s(y)))
if(false, x, s(y), c) → minus(x, minus(c, s(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, s(x0))
minus(s(x0), s(x1))
plus(x0, 0)
plus(x0, s(x1))
mod(s(x0), 0)
mod(x0, s(x1))
help(x0, s(x1), x2)
if(true, x0, s(x1), x2)
if(false, x0, s(x1), x2)

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

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


PLUS(x, s(y)) → PLUS(x, y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
PLUS(x1, x2)  =  PLUS(x1, x2)
s(x1)  =  s(x1)
le(x1, x2)  =  le(x1, x2)
0  =  0
true  =  true
false  =  false
minus(x1, x2)  =  minus(x1)
plus(x1, x2)  =  plus(x1, x2)
mod(x1, x2)  =  mod(x1, x2)
help(x1, x2, x3)  =  help(x1, x2)
if(x1, x2, x3, x4)  =  if(x2, x3)

Lexicographic path order with status [LPO].
Quasi-Precedence:
PLUS2 > minus1
le2 > true > plus2 > s1 > 0 > minus1
le2 > true > plus2 > s1 > [help2, if2] > minus1
le2 > false > s1 > 0 > minus1
le2 > false > s1 > [help2, if2] > minus1
mod2 > 0 > minus1
mod2 > [help2, if2] > minus1

Status:
PLUS2: [2,1]
plus2: [1,2]
if2: [2,1]
minus1: [1]
le2: [1,2]
mod2: [1,2]
true: []
false: []
help2: [2,1]
s1: [1]
0: []


The following usable rules [FROCOS05] were oriented:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, s(y)) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
mod(s(x), 0) → 0
mod(x, s(y)) → help(x, s(y), 0)
help(x, s(y), c) → if(le(c, x), x, s(y), c)
if(true, x, s(y), c) → help(x, s(y), plus(c, s(y)))
if(false, x, s(y), c) → minus(x, minus(c, s(y)))

(9) Obligation:

Q DP problem:
P is empty.
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)
minus(x, 0) → x
minus(0, s(y)) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
mod(s(x), 0) → 0
mod(x, s(y)) → help(x, s(y), 0)
help(x, s(y), c) → if(le(c, x), x, s(y), c)
if(true, x, s(y), c) → help(x, s(y), plus(c, s(y)))
if(false, x, s(y), c) → minus(x, minus(c, s(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, s(x0))
minus(s(x0), s(x1))
plus(x0, 0)
plus(x0, s(x1))
mod(s(x0), 0)
mod(x0, s(x1))
help(x0, s(x1), x2)
if(true, x0, s(x1), x2)
if(false, x0, s(x1), x2)

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

(10) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(11) TRUE

(12) Obligation:

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

MINUS(s(x), s(y)) → MINUS(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)
minus(x, 0) → x
minus(0, s(y)) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
mod(s(x), 0) → 0
mod(x, s(y)) → help(x, s(y), 0)
help(x, s(y), c) → if(le(c, x), x, s(y), c)
if(true, x, s(y), c) → help(x, s(y), plus(c, s(y)))
if(false, x, s(y), c) → minus(x, minus(c, s(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, s(x0))
minus(s(x0), s(x1))
plus(x0, 0)
plus(x0, s(x1))
mod(s(x0), 0)
mod(x0, s(x1))
help(x0, s(x1), x2)
if(true, x0, s(x1), x2)
if(false, x0, s(x1), x2)

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

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MINUS(s(x), s(y)) → MINUS(x, y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MINUS(x1, x2)  =  MINUS(x2)
s(x1)  =  s(x1)
le(x1, x2)  =  le(x1)
0  =  0
true  =  true
false  =  false
minus(x1, x2)  =  minus(x1)
plus(x1, x2)  =  plus(x1, x2)
mod(x1, x2)  =  mod(x1, x2)
help(x1, x2, x3)  =  help(x1, x2)
if(x1, x2, x3, x4)  =  if(x2, x3)

Lexicographic path order with status [LPO].
Quasi-Precedence:
[mod2, help2, if2] > le1 > [0, false]
[mod2, help2, if2] > le1 > true
[mod2, help2, if2] > plus2 > [s1, minus1] > [0, false]

Status:
plus2: [2,1]
if2: [2,1]
minus1: [1]
mod2: [2,1]
le1: [1]
true: []
false: []
help2: [2,1]
MINUS1: [1]
s1: [1]
0: []


The following usable rules [FROCOS05] were oriented:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, s(y)) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
mod(s(x), 0) → 0
mod(x, s(y)) → help(x, s(y), 0)
help(x, s(y), c) → if(le(c, x), x, s(y), c)
if(true, x, s(y), c) → help(x, s(y), plus(c, s(y)))
if(false, x, s(y), c) → minus(x, minus(c, s(y)))

(14) Obligation:

Q DP problem:
P is empty.
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)
minus(x, 0) → x
minus(0, s(y)) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
mod(s(x), 0) → 0
mod(x, s(y)) → help(x, s(y), 0)
help(x, s(y), c) → if(le(c, x), x, s(y), c)
if(true, x, s(y), c) → help(x, s(y), plus(c, s(y)))
if(false, x, s(y), c) → minus(x, minus(c, s(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, s(x0))
minus(s(x0), s(x1))
plus(x0, 0)
plus(x0, s(x1))
mod(s(x0), 0)
mod(x0, s(x1))
help(x0, s(x1), x2)
if(true, x0, s(x1), x2)
if(false, x0, s(x1), x2)

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

(15) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(16) TRUE

(17) Obligation:

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

LE(s(x), s(y)) → LE(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)
minus(x, 0) → x
minus(0, s(y)) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
mod(s(x), 0) → 0
mod(x, s(y)) → help(x, s(y), 0)
help(x, s(y), c) → if(le(c, x), x, s(y), c)
if(true, x, s(y), c) → help(x, s(y), plus(c, s(y)))
if(false, x, s(y), c) → minus(x, minus(c, s(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, s(x0))
minus(s(x0), s(x1))
plus(x0, 0)
plus(x0, s(x1))
mod(s(x0), 0)
mod(x0, s(x1))
help(x0, s(x1), x2)
if(true, x0, s(x1), x2)
if(false, x0, s(x1), x2)

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

(18) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


LE(s(x), s(y)) → LE(x, y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
LE(x1, x2)  =  LE(x2)
s(x1)  =  s(x1)
le(x1, x2)  =  le(x1)
0  =  0
true  =  true
false  =  false
minus(x1, x2)  =  minus(x1)
plus(x1, x2)  =  plus(x1, x2)
mod(x1, x2)  =  mod(x1, x2)
help(x1, x2, x3)  =  help(x1, x2)
if(x1, x2, x3, x4)  =  if(x2, x3)

Lexicographic path order with status [LPO].
Quasi-Precedence:
[mod2, help2, if2] > le1 > [0, false]
[mod2, help2, if2] > le1 > true
[mod2, help2, if2] > plus2 > [s1, minus1] > [0, false]

Status:
plus2: [2,1]
if2: [2,1]
minus1: [1]
mod2: [2,1]
le1: [1]
true: []
false: []
help2: [2,1]
s1: [1]
0: []
LE1: [1]


The following usable rules [FROCOS05] were oriented:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, s(y)) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
mod(s(x), 0) → 0
mod(x, s(y)) → help(x, s(y), 0)
help(x, s(y), c) → if(le(c, x), x, s(y), c)
if(true, x, s(y), c) → help(x, s(y), plus(c, s(y)))
if(false, x, s(y), c) → minus(x, minus(c, s(y)))

(19) Obligation:

Q DP problem:
P is empty.
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)
minus(x, 0) → x
minus(0, s(y)) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
mod(s(x), 0) → 0
mod(x, s(y)) → help(x, s(y), 0)
help(x, s(y), c) → if(le(c, x), x, s(y), c)
if(true, x, s(y), c) → help(x, s(y), plus(c, s(y)))
if(false, x, s(y), c) → minus(x, minus(c, s(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, s(x0))
minus(s(x0), s(x1))
plus(x0, 0)
plus(x0, s(x1))
mod(s(x0), 0)
mod(x0, s(x1))
help(x0, s(x1), x2)
if(true, x0, s(x1), x2)
if(false, x0, s(x1), x2)

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

(20) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(21) TRUE

(22) Obligation:

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

HELP(x, s(y), c) → IF(le(c, x), x, s(y), c)
IF(true, x, s(y), c) → HELP(x, s(y), plus(c, s(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)
minus(x, 0) → x
minus(0, s(y)) → 0
minus(s(x), s(y)) → minus(x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
mod(s(x), 0) → 0
mod(x, s(y)) → help(x, s(y), 0)
help(x, s(y), c) → if(le(c, x), x, s(y), c)
if(true, x, s(y), c) → help(x, s(y), plus(c, s(y)))
if(false, x, s(y), c) → minus(x, minus(c, s(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, s(x0))
minus(s(x0), s(x1))
plus(x0, 0)
plus(x0, s(x1))
mod(s(x0), 0)
mod(x0, s(x1))
help(x0, s(x1), x2)
if(true, x0, s(x1), x2)
if(false, x0, s(x1), x2)

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