(0) Obligation:

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

gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
ab
ac

Q is empty.

(1) AAECC Innermost (EQUIVALENT transformation)

We have applied [NOC,AAECCNOC] to switch to innermost. The TRS R 1 is

inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

The TRS R 2 is

gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
ab
ac

The signature Sigma is {c, a, if2, if1, gcd, pair, b, if3, gcd2, if4}

(2) Obligation:

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

gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
ab
ac

The set Q consists of the following terms:

gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a

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

GCD(x, y) → GCD2(x, y, 0)
GCD2(x, y, i) → IF1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
GCD2(x, y, i) → LE(x, 0)
GCD2(x, y, i) → LE(y, 0)
GCD2(x, y, i) → LE(x, y)
GCD2(x, y, i) → LE(y, x)
GCD2(x, y, i) → INC(i)
IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, b3, x, y, i) → GCD2(minus(x, y), y, i)
IF3(false, b3, x, y, i) → MINUS(x, y)
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
IF4(false, x, y, i) → MINUS(y, x)
INC(s(i)) → INC(i)
LE(s(x), s(y)) → LE(x, y)
MINUS(s(x), s(y)) → MINUS(x, y)

The TRS R consists of the following rules:

gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
ab
ac

The set Q consists of the following terms:

gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a

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 8 less nodes.

(6) Complex Obligation (AND)

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

gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
ab
ac

The set Q consists of the following terms:

gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a

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(s(x), s(y)) → MINUS(x, y)

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

gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a

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].

gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a

(11) Obligation:

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

MINUS(s(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(s(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:

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

The TRS R consists of the following rules:

gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
ab
ac

The set Q consists of the following terms:

gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a

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

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

(16) Obligation:

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

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

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

gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a

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

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

gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a

(18) Obligation:

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

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

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

(19) 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

(20) TRUE

(21) Obligation:

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

INC(s(i)) → INC(i)

The TRS R consists of the following rules:

gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
ab
ac

The set Q consists of the following terms:

gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a

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

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

(23) Obligation:

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

INC(s(i)) → INC(i)

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

gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a

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

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

gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a

(25) Obligation:

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

INC(s(i)) → INC(i)

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

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

  • INC(s(i)) → INC(i)
    The graph contains the following edges 1 > 1

(27) TRUE

(28) Obligation:

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

IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, b3, x, y, i) → GCD2(minus(x, y), y, i)
GCD2(x, y, i) → IF1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)

The TRS R consists of the following rules:

gcd(x, y) → gcd2(x, y, 0)
gcd2(x, y, i) → if1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
if1(true, b1, b2, b3, x, y, i) → pair(result(y), neededIterations(i))
if1(false, b1, b2, b3, x, y, i) → if2(b1, b2, b3, x, y, i)
if2(true, b2, b3, x, y, i) → pair(result(x), neededIterations(i))
if2(false, b2, b3, x, y, i) → if3(b2, b3, x, y, i)
if3(false, b3, x, y, i) → gcd2(minus(x, y), y, i)
if3(true, b3, x, y, i) → if4(b3, x, y, i)
if4(false, x, y, i) → gcd2(x, minus(y, x), i)
if4(true, x, y, i) → pair(result(x), neededIterations(i))
inc(0) → 0
inc(s(i)) → s(inc(i))
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
ab
ac

The set Q consists of the following terms:

gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a

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

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

(30) Obligation:

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

IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, b3, x, y, i) → GCD2(minus(x, y), y, i)
GCD2(x, y, i) → IF1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
inc(0)
inc(s(x0))
le(s(x0), 0)
le(0, x0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
a

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

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

gcd(x0, x1)
gcd2(x0, x1, x2)
if1(true, x0, x1, x2, x3, x4, x5)
if1(false, x0, x1, x2, x3, x4, x5)
if2(true, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if3(false, x0, x1, x2, x3)
if3(true, x0, x1, x2, x3)
if4(false, x0, x1, x2)
if4(true, x0, x1, x2)
a

(32) Obligation:

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

IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, b3, x, y, i) → GCD2(minus(x, y), y, i)
GCD2(x, y, i) → IF1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i))
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(33) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule GCD2(x, y, i) → IF1(le(x, 0), le(y, 0), le(x, y), le(y, x), x, y, inc(i)) at position [0] we obtained the following new rules [LPAR04]:

GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
GCD2(0, y1, y2) → IF1(true, le(y1, 0), le(0, y1), le(y1, 0), 0, y1, inc(y2))

(34) Obligation:

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

IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, b3, x, y, i) → GCD2(minus(x, y), y, i)
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
GCD2(0, y1, y2) → IF1(true, le(y1, 0), le(0, y1), le(y1, 0), 0, y1, inc(y2))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(35) DependencyGraphProof (EQUIVALENT transformation)

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

(36) Obligation:

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

IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, b3, x, y, i) → GCD2(minus(x, y), y, i)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(37) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule IF3(false, b3, x, y, i) → GCD2(minus(x, y), y, i) at position [0] we obtained the following new rules [LPAR04]:

IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
IF3(false, y0, 0, x0, y3) → GCD2(0, x0, y3)
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)

(38) Obligation:

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

IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
IF3(false, y0, 0, x0, y3) → GCD2(0, x0, y3)
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(39) DependencyGraphProof (EQUIVALENT transformation)

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

(40) Obligation:

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

IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i)
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(41) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF1(false, b1, b2, b3, x, y, i) → IF2(b1, b2, b3, x, y, i) we obtained the following new rules [LPAR04]:

IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3)

(42) Obligation:

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

IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i)
IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(43) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF2(false, b2, b3, x, y, i) → IF3(b2, b3, x, y, i) we obtained the following new rules [LPAR04]:

IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)

(44) Obligation:

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

IF3(true, b3, x, y, i) → IF4(b3, x, y, i)
IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(45) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF3(true, b3, x, y, i) → IF4(b3, x, y, i) we obtained the following new rules [LPAR04]:

IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)

(46) Obligation:

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

IF4(false, x, y, i) → GCD2(x, minus(y, x), i)
GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(47) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF4(false, x, y, i) → GCD2(x, minus(y, x), i) we obtained the following new rules [LPAR04]:

IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3)

(48) Obligation:

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

GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3)
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(49) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF3(false, y0, x0, 0, y3) → GCD2(x0, 0, y3) we obtained the following new rules [LPAR04]:

IF3(false, z1, s(z2), 0, z4) → GCD2(s(z2), 0, z4)

(50) Obligation:

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

GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3)
IF3(false, z1, s(z2), 0, z4) → GCD2(s(z2), 0, z4)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(51) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF1(false, y_0, y_1, y_2, s(z0), z1, y_3) → IF2(y_0, y_1, y_2, s(z0), z1, y_3) we obtained the following new rules [LPAR04]:

IF1(false, false, x1, x2, s(x3), x4, x5) → IF2(false, x1, x2, s(x3), x4, x5)

(52) Obligation:

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

GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2))
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3)
IF3(false, z1, s(z2), 0, z4) → GCD2(s(z2), 0, z4)
IF1(false, false, x1, x2, s(x3), x4, x5) → IF2(false, x1, x2, s(x3), x4, x5)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(53) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule GCD2(s(x0), y1, y2) → IF1(false, le(y1, 0), le(s(x0), y1), le(y1, s(x0)), s(x0), y1, inc(y2)) at position [1] we obtained the following new rules [LPAR04]:

GCD2(s(y0), s(x0), y2) → IF1(false, false, le(s(y0), s(x0)), le(s(x0), s(y0)), s(y0), s(x0), inc(y2))
GCD2(s(y0), 0, y2) → IF1(false, true, le(s(y0), 0), le(0, s(y0)), s(y0), 0, inc(y2))

(54) Obligation:

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

IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3)
IF3(false, z1, s(z2), 0, z4) → GCD2(s(z2), 0, z4)
IF1(false, false, x1, x2, s(x3), x4, x5) → IF2(false, x1, x2, s(x3), x4, x5)
GCD2(s(y0), s(x0), y2) → IF1(false, false, le(s(y0), s(x0)), le(s(x0), s(y0)), s(y0), s(x0), inc(y2))
GCD2(s(y0), 0, y2) → IF1(false, true, le(s(y0), 0), le(0, s(y0)), s(y0), 0, inc(y2))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(55) DependencyGraphProof (EQUIVALENT transformation)

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

(56) Obligation:

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

GCD2(s(y0), s(x0), y2) → IF1(false, false, le(s(y0), s(x0)), le(s(x0), s(y0)), s(y0), s(x0), inc(y2))
IF1(false, false, x1, x2, s(x3), x4, x5) → IF2(false, x1, x2, s(x3), x4, x5)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(57) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule GCD2(s(y0), s(x0), y2) → IF1(false, false, le(s(y0), s(x0)), le(s(x0), s(y0)), s(y0), s(x0), inc(y2)) at position [2] we obtained the following new rules [LPAR04]:

GCD2(s(y0), s(x0), y2) → IF1(false, false, le(y0, x0), le(s(x0), s(y0)), s(y0), s(x0), inc(y2))

(58) Obligation:

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

IF1(false, false, x1, x2, s(x3), x4, x5) → IF2(false, x1, x2, s(x3), x4, x5)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3)
GCD2(s(y0), s(x0), y2) → IF1(false, false, le(y0, x0), le(s(x0), s(y0)), s(y0), s(x0), inc(y2))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(59) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule GCD2(s(y0), s(x0), y2) → IF1(false, false, le(y0, x0), le(s(x0), s(y0)), s(y0), s(x0), inc(y2)) at position [3] we obtained the following new rules [LPAR04]:

GCD2(s(y0), s(x0), y2) → IF1(false, false, le(y0, x0), le(x0, y0), s(y0), s(x0), inc(y2))

(60) Obligation:

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

IF1(false, false, x1, x2, s(x3), x4, x5) → IF2(false, x1, x2, s(x3), x4, x5)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3)
GCD2(s(y0), s(x0), y2) → IF1(false, false, le(y0, x0), le(x0, y0), s(y0), s(x0), inc(y2))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(61) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule IF4(false, s(z1), z2, z3) → GCD2(s(z1), minus(z2, s(z1)), z3) at position [1] we obtained the following new rules [LPAR04]:

IF4(false, s(y0), 0, y2) → GCD2(s(y0), 0, y2)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)

(62) Obligation:

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

IF1(false, false, x1, x2, s(x3), x4, x5) → IF2(false, x1, x2, s(x3), x4, x5)
IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
GCD2(s(y0), s(x0), y2) → IF1(false, false, le(y0, x0), le(x0, y0), s(y0), s(x0), inc(y2))
IF4(false, s(y0), 0, y2) → GCD2(s(y0), 0, y2)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(63) DependencyGraphProof (EQUIVALENT transformation)

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

(64) Obligation:

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

IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
GCD2(s(y0), s(x0), y2) → IF1(false, false, le(y0, x0), le(x0, y0), s(y0), s(x0), inc(y2))
IF1(false, false, x1, x2, s(x3), x4, x5) → IF2(false, x1, x2, s(x3), x4, x5)
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(65) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF1(false, false, x1, x2, s(x3), x4, x5) → IF2(false, x1, x2, s(x3), x4, x5) we obtained the following new rules [LPAR04]:

IF1(false, false, y_0, y_1, s(z0), s(z1), y_2) → IF2(false, y_0, y_1, s(z0), s(z1), y_2)

(66) Obligation:

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

IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5)
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
GCD2(s(y0), s(x0), y2) → IF1(false, false, le(y0, x0), le(x0, y0), s(y0), s(x0), inc(y2))
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
IF1(false, false, y_0, y_1, s(z0), s(z1), y_2) → IF2(false, y_0, y_1, s(z0), s(z1), y_2)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(67) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF2(false, z1, z2, s(z3), z4, z5) → IF3(z1, z2, s(z3), z4, z5) we obtained the following new rules [LPAR04]:

IF2(false, z0, z1, s(z2), s(z3), z4) → IF3(z0, z1, s(z2), s(z3), z4)

(68) Obligation:

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

IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
GCD2(s(y0), s(x0), y2) → IF1(false, false, le(y0, x0), le(x0, y0), s(y0), s(x0), inc(y2))
IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
IF1(false, false, y_0, y_1, s(z0), s(z1), y_2) → IF2(false, y_0, y_1, s(z0), s(z1), y_2)
IF2(false, z0, z1, s(z2), s(z3), z4) → IF3(z0, z1, s(z2), s(z3), z4)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(69) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF3(true, z1, s(z2), z3, z4) → IF4(z1, s(z2), z3, z4) we obtained the following new rules [LPAR04]:

IF3(true, z1, s(z2), s(z3), z4) → IF4(z1, s(z2), s(z3), z4)

(70) Obligation:

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

IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
GCD2(s(y0), s(x0), y2) → IF1(false, false, le(y0, x0), le(x0, y0), s(y0), s(x0), inc(y2))
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
IF1(false, false, y_0, y_1, s(z0), s(z1), y_2) → IF2(false, y_0, y_1, s(z0), s(z1), y_2)
IF2(false, z0, z1, s(z2), s(z3), z4) → IF3(z0, z1, s(z2), s(z3), z4)
IF3(true, z1, s(z2), s(z3), z4) → IF4(z1, s(z2), s(z3), z4)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(71) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF2(false, z0, z1, s(z2), s(z3), z4) → IF3(z0, z1, s(z2), s(z3), z4) we obtained the following new rules [LPAR04]:

IF2(false, false, x1, s(x2), s(x3), x4) → IF3(false, x1, s(x2), s(x3), x4)
IF2(false, true, x1, s(x2), s(x3), x4) → IF3(true, x1, s(x2), s(x3), x4)

(72) Obligation:

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

IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
GCD2(s(y0), s(x0), y2) → IF1(false, false, le(y0, x0), le(x0, y0), s(y0), s(x0), inc(y2))
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
IF1(false, false, y_0, y_1, s(z0), s(z1), y_2) → IF2(false, y_0, y_1, s(z0), s(z1), y_2)
IF3(true, z1, s(z2), s(z3), z4) → IF4(z1, s(z2), s(z3), z4)
IF2(false, false, x1, s(x2), s(x3), x4) → IF3(false, x1, s(x2), s(x3), x4)
IF2(false, true, x1, s(x2), s(x3), x4) → IF3(true, x1, s(x2), s(x3), x4)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(73) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF1(false, false, y_0, y_1, s(z0), s(z1), y_2) → IF2(false, y_0, y_1, s(z0), s(z1), y_2) we obtained the following new rules [LPAR04]:

IF1(false, false, false, x1, s(x2), s(x3), x4) → IF2(false, false, x1, s(x2), s(x3), x4)
IF1(false, false, true, x1, s(x2), s(x3), x4) → IF2(false, true, x1, s(x2), s(x3), x4)

(74) Obligation:

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

IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
GCD2(s(y0), s(x0), y2) → IF1(false, false, le(y0, x0), le(x0, y0), s(y0), s(x0), inc(y2))
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
IF3(true, z1, s(z2), s(z3), z4) → IF4(z1, s(z2), s(z3), z4)
IF2(false, false, x1, s(x2), s(x3), x4) → IF3(false, x1, s(x2), s(x3), x4)
IF2(false, true, x1, s(x2), s(x3), x4) → IF3(true, x1, s(x2), s(x3), x4)
IF1(false, false, false, x1, s(x2), s(x3), x4) → IF2(false, false, x1, s(x2), s(x3), x4)
IF1(false, false, true, x1, s(x2), s(x3), x4) → IF2(false, true, x1, s(x2), s(x3), x4)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(75) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule GCD2(s(y0), s(x0), y2) → IF1(false, false, le(y0, x0), le(x0, y0), s(y0), s(x0), inc(y2)) at position [2] we obtained the following new rules [LPAR04]:

GCD2(s(s(x0)), s(0), y2) → IF1(false, false, false, le(0, s(x0)), s(s(x0)), s(0), inc(y2))
GCD2(s(0), s(x0), y2) → IF1(false, false, true, le(x0, 0), s(0), s(x0), inc(y2))
GCD2(s(s(x0)), s(s(x1)), y2) → IF1(false, false, le(x0, x1), le(s(x1), s(x0)), s(s(x0)), s(s(x1)), inc(y2))

(76) Obligation:

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

IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
IF3(true, z1, s(z2), s(z3), z4) → IF4(z1, s(z2), s(z3), z4)
IF2(false, false, x1, s(x2), s(x3), x4) → IF3(false, x1, s(x2), s(x3), x4)
IF2(false, true, x1, s(x2), s(x3), x4) → IF3(true, x1, s(x2), s(x3), x4)
IF1(false, false, false, x1, s(x2), s(x3), x4) → IF2(false, false, x1, s(x2), s(x3), x4)
IF1(false, false, true, x1, s(x2), s(x3), x4) → IF2(false, true, x1, s(x2), s(x3), x4)
GCD2(s(s(x0)), s(0), y2) → IF1(false, false, false, le(0, s(x0)), s(s(x0)), s(0), inc(y2))
GCD2(s(0), s(x0), y2) → IF1(false, false, true, le(x0, 0), s(0), s(x0), inc(y2))
GCD2(s(s(x0)), s(s(x1)), y2) → IF1(false, false, le(x0, x1), le(s(x1), s(x0)), s(s(x0)), s(s(x1)), inc(y2))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(77) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule GCD2(s(s(x0)), s(0), y2) → IF1(false, false, false, le(0, s(x0)), s(s(x0)), s(0), inc(y2)) at position [3] we obtained the following new rules [LPAR04]:

GCD2(s(s(x0)), s(0), y2) → IF1(false, false, false, true, s(s(x0)), s(0), inc(y2))

(78) Obligation:

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

IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
IF3(true, z1, s(z2), s(z3), z4) → IF4(z1, s(z2), s(z3), z4)
IF2(false, false, x1, s(x2), s(x3), x4) → IF3(false, x1, s(x2), s(x3), x4)
IF2(false, true, x1, s(x2), s(x3), x4) → IF3(true, x1, s(x2), s(x3), x4)
IF1(false, false, false, x1, s(x2), s(x3), x4) → IF2(false, false, x1, s(x2), s(x3), x4)
IF1(false, false, true, x1, s(x2), s(x3), x4) → IF2(false, true, x1, s(x2), s(x3), x4)
GCD2(s(0), s(x0), y2) → IF1(false, false, true, le(x0, 0), s(0), s(x0), inc(y2))
GCD2(s(s(x0)), s(s(x1)), y2) → IF1(false, false, le(x0, x1), le(s(x1), s(x0)), s(s(x0)), s(s(x1)), inc(y2))
GCD2(s(s(x0)), s(0), y2) → IF1(false, false, false, true, s(s(x0)), s(0), inc(y2))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(79) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule GCD2(s(s(x0)), s(s(x1)), y2) → IF1(false, false, le(x0, x1), le(s(x1), s(x0)), s(s(x0)), s(s(x1)), inc(y2)) at position [3] we obtained the following new rules [LPAR04]:

GCD2(s(s(x0)), s(s(x1)), y2) → IF1(false, false, le(x0, x1), le(x1, x0), s(s(x0)), s(s(x1)), inc(y2))

(80) Obligation:

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

IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
IF3(true, z1, s(z2), s(z3), z4) → IF4(z1, s(z2), s(z3), z4)
IF2(false, false, x1, s(x2), s(x3), x4) → IF3(false, x1, s(x2), s(x3), x4)
IF2(false, true, x1, s(x2), s(x3), x4) → IF3(true, x1, s(x2), s(x3), x4)
IF1(false, false, false, x1, s(x2), s(x3), x4) → IF2(false, false, x1, s(x2), s(x3), x4)
IF1(false, false, true, x1, s(x2), s(x3), x4) → IF2(false, true, x1, s(x2), s(x3), x4)
GCD2(s(0), s(x0), y2) → IF1(false, false, true, le(x0, 0), s(0), s(x0), inc(y2))
GCD2(s(s(x0)), s(0), y2) → IF1(false, false, false, true, s(s(x0)), s(0), inc(y2))
GCD2(s(s(x0)), s(s(x1)), y2) → IF1(false, false, le(x0, x1), le(x1, x0), s(s(x0)), s(s(x1)), inc(y2))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(81) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF3(true, z1, s(z2), s(z3), z4) → IF4(z1, s(z2), s(z3), z4) we obtained the following new rules [LPAR04]:

IF3(true, false, s(x1), s(x2), x3) → IF4(false, s(x1), s(x2), x3)

(82) Obligation:

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

IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
IF2(false, false, x1, s(x2), s(x3), x4) → IF3(false, x1, s(x2), s(x3), x4)
IF2(false, true, x1, s(x2), s(x3), x4) → IF3(true, x1, s(x2), s(x3), x4)
IF1(false, false, false, x1, s(x2), s(x3), x4) → IF2(false, false, x1, s(x2), s(x3), x4)
IF1(false, false, true, x1, s(x2), s(x3), x4) → IF2(false, true, x1, s(x2), s(x3), x4)
GCD2(s(0), s(x0), y2) → IF1(false, false, true, le(x0, 0), s(0), s(x0), inc(y2))
GCD2(s(s(x0)), s(0), y2) → IF1(false, false, false, true, s(s(x0)), s(0), inc(y2))
GCD2(s(s(x0)), s(s(x1)), y2) → IF1(false, false, le(x0, x1), le(x1, x0), s(s(x0)), s(s(x1)), inc(y2))
IF3(true, false, s(x1), s(x2), x3) → IF4(false, s(x1), s(x2), x3)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(83) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF2(false, true, x1, s(x2), s(x3), x4) → IF3(true, x1, s(x2), s(x3), x4) we obtained the following new rules [LPAR04]:

IF2(false, true, false, s(x1), s(x2), x3) → IF3(true, false, s(x1), s(x2), x3)

(84) Obligation:

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

IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
IF2(false, false, x1, s(x2), s(x3), x4) → IF3(false, x1, s(x2), s(x3), x4)
IF1(false, false, false, x1, s(x2), s(x3), x4) → IF2(false, false, x1, s(x2), s(x3), x4)
IF1(false, false, true, x1, s(x2), s(x3), x4) → IF2(false, true, x1, s(x2), s(x3), x4)
GCD2(s(0), s(x0), y2) → IF1(false, false, true, le(x0, 0), s(0), s(x0), inc(y2))
GCD2(s(s(x0)), s(0), y2) → IF1(false, false, false, true, s(s(x0)), s(0), inc(y2))
GCD2(s(s(x0)), s(s(x1)), y2) → IF1(false, false, le(x0, x1), le(x1, x0), s(s(x0)), s(s(x1)), inc(y2))
IF3(true, false, s(x1), s(x2), x3) → IF4(false, s(x1), s(x2), x3)
IF2(false, true, false, s(x1), s(x2), x3) → IF3(true, false, s(x1), s(x2), x3)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(85) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF1(false, false, true, x1, s(x2), s(x3), x4) → IF2(false, true, x1, s(x2), s(x3), x4) we obtained the following new rules [LPAR04]:

IF1(false, false, true, false, s(x1), s(x2), x3) → IF2(false, true, false, s(x1), s(x2), x3)

(86) Obligation:

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

IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
IF2(false, false, x1, s(x2), s(x3), x4) → IF3(false, x1, s(x2), s(x3), x4)
IF1(false, false, false, x1, s(x2), s(x3), x4) → IF2(false, false, x1, s(x2), s(x3), x4)
GCD2(s(0), s(x0), y2) → IF1(false, false, true, le(x0, 0), s(0), s(x0), inc(y2))
GCD2(s(s(x0)), s(0), y2) → IF1(false, false, false, true, s(s(x0)), s(0), inc(y2))
GCD2(s(s(x0)), s(s(x1)), y2) → IF1(false, false, le(x0, x1), le(x1, x0), s(s(x0)), s(s(x1)), inc(y2))
IF3(true, false, s(x1), s(x2), x3) → IF4(false, s(x1), s(x2), x3)
IF2(false, true, false, s(x1), s(x2), x3) → IF3(true, false, s(x1), s(x2), x3)
IF1(false, false, true, false, s(x1), s(x2), x3) → IF2(false, true, false, s(x1), s(x2), x3)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(87) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule GCD2(s(0), s(x0), y2) → IF1(false, false, true, le(x0, 0), s(0), s(x0), inc(y2)) at position [3] we obtained the following new rules [LPAR04]:

GCD2(s(0), s(s(x0)), y1) → IF1(false, false, true, false, s(0), s(s(x0)), inc(y1))
GCD2(s(0), s(0), y1) → IF1(false, false, true, true, s(0), s(0), inc(y1))

(88) Obligation:

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

IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
IF2(false, false, x1, s(x2), s(x3), x4) → IF3(false, x1, s(x2), s(x3), x4)
IF1(false, false, false, x1, s(x2), s(x3), x4) → IF2(false, false, x1, s(x2), s(x3), x4)
GCD2(s(s(x0)), s(0), y2) → IF1(false, false, false, true, s(s(x0)), s(0), inc(y2))
GCD2(s(s(x0)), s(s(x1)), y2) → IF1(false, false, le(x0, x1), le(x1, x0), s(s(x0)), s(s(x1)), inc(y2))
IF3(true, false, s(x1), s(x2), x3) → IF4(false, s(x1), s(x2), x3)
IF2(false, true, false, s(x1), s(x2), x3) → IF3(true, false, s(x1), s(x2), x3)
IF1(false, false, true, false, s(x1), s(x2), x3) → IF2(false, true, false, s(x1), s(x2), x3)
GCD2(s(0), s(s(x0)), y1) → IF1(false, false, true, false, s(0), s(s(x0)), inc(y1))
GCD2(s(0), s(0), y1) → IF1(false, false, true, true, s(0), s(0), inc(y1))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(89) DependencyGraphProof (EQUIVALENT transformation)

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

(90) Obligation:

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

GCD2(s(s(x0)), s(0), y2) → IF1(false, false, false, true, s(s(x0)), s(0), inc(y2))
IF1(false, false, false, x1, s(x2), s(x3), x4) → IF2(false, false, x1, s(x2), s(x3), x4)
IF2(false, false, x1, s(x2), s(x3), x4) → IF3(false, x1, s(x2), s(x3), x4)
IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
GCD2(s(s(x0)), s(s(x1)), y2) → IF1(false, false, le(x0, x1), le(x1, x0), s(s(x0)), s(s(x1)), inc(y2))
IF1(false, false, true, false, s(x1), s(x2), x3) → IF2(false, true, false, s(x1), s(x2), x3)
IF2(false, true, false, s(x1), s(x2), x3) → IF3(true, false, s(x1), s(x2), x3)
IF3(true, false, s(x1), s(x2), x3) → IF4(false, s(x1), s(x2), x3)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
GCD2(s(0), s(s(x0)), y1) → IF1(false, false, true, false, s(0), s(s(x0)), inc(y1))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(91) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF3(false, y0, s(x0), s(x1), y3) → GCD2(minus(x0, x1), s(x1), y3)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(GCD2(x1, x2, x3)) = x1   
POL(IF1(x1, x2, x3, x4, x5, x6, x7)) = x5   
POL(IF2(x1, x2, x3, x4, x5, x6)) = x4   
POL(IF3(x1, x2, x3, x4, x5)) = x3   
POL(IF4(x1, x2, x3, x4)) = x2   
POL(false) = 0   
POL(inc(x1)) = 0   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = 1 + x1   
POL(true) = 0   

The following usable rules [FROCOS05] were oriented:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

(92) Obligation:

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

GCD2(s(s(x0)), s(0), y2) → IF1(false, false, false, true, s(s(x0)), s(0), inc(y2))
IF1(false, false, false, x1, s(x2), s(x3), x4) → IF2(false, false, x1, s(x2), s(x3), x4)
IF2(false, false, x1, s(x2), s(x3), x4) → IF3(false, x1, s(x2), s(x3), x4)
GCD2(s(s(x0)), s(s(x1)), y2) → IF1(false, false, le(x0, x1), le(x1, x0), s(s(x0)), s(s(x1)), inc(y2))
IF1(false, false, true, false, s(x1), s(x2), x3) → IF2(false, true, false, s(x1), s(x2), x3)
IF2(false, true, false, s(x1), s(x2), x3) → IF3(true, false, s(x1), s(x2), x3)
IF3(true, false, s(x1), s(x2), x3) → IF4(false, s(x1), s(x2), x3)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
GCD2(s(0), s(s(x0)), y1) → IF1(false, false, true, false, s(0), s(s(x0)), inc(y1))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(93) DependencyGraphProof (EQUIVALENT transformation)

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

(94) Obligation:

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

GCD2(s(s(x0)), s(s(x1)), y2) → IF1(false, false, le(x0, x1), le(x1, x0), s(s(x0)), s(s(x1)), inc(y2))
IF1(false, false, true, false, s(x1), s(x2), x3) → IF2(false, true, false, s(x1), s(x2), x3)
IF2(false, true, false, s(x1), s(x2), x3) → IF3(true, false, s(x1), s(x2), x3)
IF3(true, false, s(x1), s(x2), x3) → IF4(false, s(x1), s(x2), x3)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)
GCD2(s(0), s(s(x0)), y1) → IF1(false, false, true, false, s(0), s(s(x0)), inc(y1))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(95) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


GCD2(s(s(x0)), s(s(x1)), y2) → IF1(false, false, le(x0, x1), le(x1, x0), s(s(x0)), s(s(x1)), inc(y2))
GCD2(s(0), s(s(x0)), y1) → IF1(false, false, true, false, s(0), s(s(x0)), inc(y1))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(GCD2(x1, x2, x3)) = 1 + x1 + x2   
POL(IF1(x1, x2, x3, x4, x5, x6, x7)) = x5 + x6   
POL(IF2(x1, x2, x3, x4, x5, x6)) = x4 + x5   
POL(IF3(x1, x2, x3, x4, x5)) = x3 + x4   
POL(IF4(x1, x2, x3, x4)) = x2 + x3   
POL(false) = 0   
POL(inc(x1)) = 0   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = 1 + x1   
POL(true) = 0   

The following usable rules [FROCOS05] were oriented:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)

(96) Obligation:

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

IF1(false, false, true, false, s(x1), s(x2), x3) → IF2(false, true, false, s(x1), s(x2), x3)
IF2(false, true, false, s(x1), s(x2), x3) → IF3(true, false, s(x1), s(x2), x3)
IF3(true, false, s(x1), s(x2), x3) → IF4(false, s(x1), s(x2), x3)
IF4(false, s(x1), s(x0), y2) → GCD2(s(x1), minus(x0, x1), y2)

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, y) → 0
minus(s(x), s(y)) → minus(x, y)
le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)
inc(0) → 0
inc(s(i)) → s(inc(i))

The set Q consists of the following terms:

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

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

(97) DependencyGraphProof (EQUIVALENT transformation)

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

(98) TRUE