(0) Obligation:

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

minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gcd(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → if3(gt(x, 0), x, y)
if2(true, x, y) → gcd(minus(x, y), y)
if2(false, x, y) → x
if3(true, x, y) → gcd(x, minus(y, x))
if3(false, x, y) → y
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, 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:

minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gcd(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → if3(gt(x, 0), x, y)
if2(true, x, y) → gcd(minus(x, y), y)
if2(false, x, y) → x
if3(true, x, y) → gcd(x, minus(y, x))
if3(false, x, y) → y
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
if3(true, x0, x1)
if3(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

MINUS(s(x), y) → IF(gt(s(x), y), x, y)
MINUS(s(x), y) → GT(s(x), y)
IF(true, x, y) → MINUS(x, y)
GCD(x, y) → IF1(ge(x, y), x, y)
GCD(x, y) → GE(x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)
IF1(true, x, y) → GT(y, 0)
IF1(false, x, y) → IF3(gt(x, 0), x, y)
IF1(false, x, y) → GT(x, 0)
IF2(true, x, y) → GCD(minus(x, y), y)
IF2(true, x, y) → MINUS(x, y)
IF3(true, x, y) → GCD(x, minus(y, x))
IF3(true, x, y) → MINUS(y, x)
GT(s(x), s(y)) → GT(x, y)
GE(s(x), s(y)) → GE(x, y)

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gcd(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → if3(gt(x, 0), x, y)
if2(true, x, y) → gcd(minus(x, y), y)
if2(false, x, y) → x
if3(true, x, y) → gcd(x, minus(y, x))
if3(false, x, y) → y
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
if3(true, x0, x1)
if3(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(6) Complex Obligation (AND)

(7) Obligation:

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

GE(s(x), s(y)) → GE(x, y)

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gcd(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → if3(gt(x, 0), x, y)
if2(true, x, y) → gcd(minus(x, y), y)
if2(false, x, y) → x
if3(true, x, y) → gcd(x, minus(y, x))
if3(false, x, y) → y
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
if3(true, x0, x1)
if3(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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:

GE(s(x), s(y)) → GE(x, y)

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

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
if3(true, x0, x1)
if3(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
if3(true, x0, x1)
if3(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

(11) Obligation:

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

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

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

(13) YES

(14) Obligation:

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

GT(s(x), s(y)) → GT(x, y)

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gcd(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → if3(gt(x, 0), x, y)
if2(true, x, y) → gcd(minus(x, y), y)
if2(false, x, y) → x
if3(true, x, y) → gcd(x, minus(y, x))
if3(false, x, y) → y
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
if3(true, x0, x1)
if3(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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:

GT(s(x), s(y)) → GT(x, y)

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

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
if3(true, x0, x1)
if3(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
if3(true, x0, x1)
if3(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

(18) Obligation:

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

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

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

(20) YES

(21) Obligation:

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

IF(true, x, y) → MINUS(x, y)
MINUS(s(x), y) → IF(gt(s(x), y), x, y)

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gcd(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → if3(gt(x, 0), x, y)
if2(true, x, y) → gcd(minus(x, y), y)
if2(false, x, y) → x
if3(true, x, y) → gcd(x, minus(y, x))
if3(false, x, y) → y
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
if3(true, x0, x1)
if3(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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:

IF(true, x, y) → MINUS(x, y)
MINUS(s(x), y) → IF(gt(s(x), y), x, y)

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
if3(true, x0, x1)
if3(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
if3(true, x0, x1)
if3(false, x0, x1)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

(25) Obligation:

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

IF(true, x, y) → MINUS(x, y)
MINUS(s(x), y) → IF(gt(s(x), y), x, y)

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))

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:

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

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

(27) YES

(28) Obligation:

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

IF2(true, x, y) → GCD(minus(x, y), y)
GCD(x, y) → IF1(ge(x, y), x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)
IF1(false, x, y) → IF3(gt(x, 0), x, y)
IF3(true, x, y) → GCD(x, minus(y, x))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gcd(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → if3(gt(x, 0), x, y)
if2(true, x, y) → gcd(minus(x, y), y)
if2(false, x, y) → x
if3(true, x, y) → gcd(x, minus(y, x))
if3(false, x, y) → y
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
if3(true, x0, x1)
if3(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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:

IF2(true, x, y) → GCD(minus(x, y), y)
GCD(x, y) → IF1(ge(x, y), x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)
IF1(false, x, y) → IF3(gt(x, 0), x, y)
IF3(true, x, y) → GCD(x, minus(y, x))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gcd(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
if3(true, x0, x1)
if3(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
if3(true, x0, x1)
if3(false, x0, x1)

(32) Obligation:

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

IF2(true, x, y) → GCD(minus(x, y), y)
GCD(x, y) → IF1(ge(x, y), x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)
IF1(false, x, y) → IF3(gt(x, 0), x, y)
IF3(true, x, y) → GCD(x, minus(y, x))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(33) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule GCD(x, y) → IF1(ge(x, y), x, y) at position [0] we obtained the following new rules [LPAR04]:

GCD(x0, 0) → IF1(true, x0, 0)
GCD(0, s(x0)) → IF1(false, 0, s(x0))
GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))

(34) Obligation:

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

IF2(true, x, y) → GCD(minus(x, y), y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)
IF1(false, x, y) → IF3(gt(x, 0), x, y)
IF3(true, x, y) → GCD(x, minus(y, x))
GCD(x0, 0) → IF1(true, x0, 0)
GCD(0, s(x0)) → IF1(false, 0, s(x0))
GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(35) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule IF1(true, x, y) → IF2(gt(y, 0), x, y) at position [0] we obtained the following new rules [LPAR04]:

IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF1(true, y0, 0) → IF2(false, y0, 0)

(36) Obligation:

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

IF2(true, x, y) → GCD(minus(x, y), y)
IF1(false, x, y) → IF3(gt(x, 0), x, y)
IF3(true, x, y) → GCD(x, minus(y, x))
GCD(x0, 0) → IF1(true, x0, 0)
GCD(0, s(x0)) → IF1(false, 0, s(x0))
GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF1(true, y0, 0) → IF2(false, y0, 0)

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(37) DependencyGraphProof (EQUIVALENT transformation)

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

(38) Obligation:

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

GCD(0, s(x0)) → IF1(false, 0, s(x0))
IF1(false, x, y) → IF3(gt(x, 0), x, y)
IF3(true, x, y) → GCD(x, minus(y, x))
GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF2(true, x, y) → GCD(minus(x, y), y)

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(39) Narrowing (EQUIVALENT transformation)

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

IF1(false, s(x0), y1) → IF3(true, s(x0), y1)
IF1(false, 0, y1) → IF3(false, 0, y1)

(40) Obligation:

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

GCD(0, s(x0)) → IF1(false, 0, s(x0))
IF3(true, x, y) → GCD(x, minus(y, x))
GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF2(true, x, y) → GCD(minus(x, y), y)
IF1(false, s(x0), y1) → IF3(true, s(x0), y1)
IF1(false, 0, y1) → IF3(false, 0, y1)

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(42) Obligation:

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

GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF2(true, x, y) → GCD(minus(x, y), y)
IF1(false, s(x0), y1) → IF3(true, s(x0), y1)
IF3(true, x, y) → GCD(x, minus(y, x))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(43) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule IF2(true, x, y) → GCD(minus(x, y), y) at position [0] we obtained the following new rules [LPAR04]:

IF2(true, s(x0), x1) → GCD(if(gt(s(x0), x1), x0, x1), x1)

(44) Obligation:

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

GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF1(false, s(x0), y1) → IF3(true, s(x0), y1)
IF3(true, x, y) → GCD(x, minus(y, x))
IF2(true, s(x0), x1) → GCD(if(gt(s(x0), x1), x0, x1), x1)

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(45) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule IF3(true, x, y) → GCD(x, minus(y, x)) at position [1] we obtained the following new rules [LPAR04]:

IF3(true, x1, s(x0)) → GCD(x1, if(gt(s(x0), x1), x0, x1))

(46) Obligation:

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

GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF1(false, s(x0), y1) → IF3(true, s(x0), y1)
IF2(true, s(x0), x1) → GCD(if(gt(s(x0), x1), x0, x1), x1)
IF3(true, x1, s(x0)) → GCD(x1, if(gt(s(x0), x1), x0, x1))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(47) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF1(true, y0, s(x0)) → IF2(true, y0, s(x0)) we obtained the following new rules [LPAR04]:

IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))

(48) Obligation:

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

GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(false, s(x0), y1) → IF3(true, s(x0), y1)
IF2(true, s(x0), x1) → GCD(if(gt(s(x0), x1), x0, x1), x1)
IF3(true, x1, s(x0)) → GCD(x1, if(gt(s(x0), x1), x0, x1))
IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(49) Instantiation (EQUIVALENT transformation)

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

IF1(false, s(z0), s(z1)) → IF3(true, s(z0), s(z1))

(50) Obligation:

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

GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF2(true, s(x0), x1) → GCD(if(gt(s(x0), x1), x0, x1), x1)
IF3(true, x1, s(x0)) → GCD(x1, if(gt(s(x0), x1), x0, x1))
IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))
IF1(false, s(z0), s(z1)) → IF3(true, s(z0), s(z1))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(51) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF2(true, s(x0), x1) → GCD(if(gt(s(x0), x1), x0, x1), x1) we obtained the following new rules [LPAR04]:

IF2(true, s(z0), s(z1)) → GCD(if(gt(s(z0), s(z1)), z0, s(z1)), s(z1))

(52) Obligation:

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

GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF3(true, x1, s(x0)) → GCD(x1, if(gt(s(x0), x1), x0, x1))
IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))
IF1(false, s(z0), s(z1)) → IF3(true, s(z0), s(z1))
IF2(true, s(z0), s(z1)) → GCD(if(gt(s(z0), s(z1)), z0, s(z1)), s(z1))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(53) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule IF2(true, s(z0), s(z1)) → GCD(if(gt(s(z0), s(z1)), z0, s(z1)), s(z1)) at position [0,0] we obtained the following new rules [LPAR04]:

IF2(true, s(z0), s(z1)) → GCD(if(gt(z0, z1), z0, s(z1)), s(z1))

(54) Obligation:

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

GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF3(true, x1, s(x0)) → GCD(x1, if(gt(s(x0), x1), x0, x1))
IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))
IF1(false, s(z0), s(z1)) → IF3(true, s(z0), s(z1))
IF2(true, s(z0), s(z1)) → GCD(if(gt(z0, z1), z0, s(z1)), s(z1))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(55) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF3(true, x1, s(x0)) → GCD(x1, if(gt(s(x0), x1), x0, x1)) we obtained the following new rules [LPAR04]:

IF3(true, s(z0), s(z1)) → GCD(s(z0), if(gt(s(z1), s(z0)), z1, s(z0)))

(56) Obligation:

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

GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))
IF1(false, s(z0), s(z1)) → IF3(true, s(z0), s(z1))
IF2(true, s(z0), s(z1)) → GCD(if(gt(z0, z1), z0, s(z1)), s(z1))
IF3(true, s(z0), s(z1)) → GCD(s(z0), if(gt(s(z1), s(z0)), z1, s(z0)))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(57) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule IF3(true, s(z0), s(z1)) → GCD(s(z0), if(gt(s(z1), s(z0)), z1, s(z0))) at position [1,0] we obtained the following new rules [LPAR04]:

IF3(true, s(z0), s(z1)) → GCD(s(z0), if(gt(z1, z0), z1, s(z0)))

(58) Obligation:

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

GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))
IF1(false, s(z0), s(z1)) → IF3(true, s(z0), s(z1))
IF2(true, s(z0), s(z1)) → GCD(if(gt(z0, z1), z0, s(z1)), s(z1))
IF3(true, s(z0), s(z1)) → GCD(s(z0), if(gt(z1, z0), z1, s(z0)))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(59) Induction-Processor (SOUND transformation)


This DP could be deleted by the Induction-Processor:
IF2(true, s(z0''), s(z1'')) → GCD(if(gt(z0'', z1''), z0'', s(z1'')), s(z1''))


This order was computed:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(GCD(x1, x2)) = x1   
POL(IF1(x1, x2, x3)) = x2   
POL(IF2(x1, x2, x3)) = x2   
POL(IF3(x1, x2, x3)) = x2   
POL(false) = 0   
POL(ge(x1, x2)) = x1   
POL(gt(x1, x2)) = 0   
POL(if(x1, x2, x3)) = 1 + x2   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = 1 + x1   
POL(true) = 0   

At least one of these decreasing rules is always used after the deleted DP:
if(false, x332, y242) → 0


The following formula is valid:
z0'':sort[a0],z1'':sort[a0].if'(gt(z0'' , z1'' ), z0'' , s(z1'' ))=true


The transformed set:
minus'(s(x5), y3) → if'(gt(s(x5), y3), x5, y3)
if'(true, x24, y17) → minus'(x24, y17)
if'(false, x33, y24) → true
minus'(0, x1) → false
gt(s(x), 0) → true
minus(s(x5), y3) → if(gt(s(x5), y3), x5, y3)
gt(s(x15), s(y10)) → gt(x15, y10)
if(true, x24, y17) → s(minus(x24, y17))
if(false, x33, y24) → 0
gt(0, y31) → false
ge(x50, 0) → true
ge(0, s(x59)) → false
ge(s(x68), s(y50)) → ge(x68, y50)
minus(0, x1) → 0
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](0, s(x0)) → false
equal_sort[a0](0, 0) → true
equal_sort[a44](witness_sort[a44], witness_sort[a44]) → true


The proof given by the theorem prover:
The following program was given to the internal theorem prover:
   [x, x0, x1, x33, y24, x5, y17, y3, x15, y10, y31, x50, x59, x68, y50]
   equal_bool(true, false) -> false
   equal_bool(false, true) -> false
   equal_bool(true, true) -> true
   equal_bool(false, false) -> true
   true and x -> x
   false and x -> false
   true or x -> true
   false or x -> x
   not(false) -> true
   not(true) -> false
   isa_true(true) -> true
   isa_true(false) -> false
   isa_false(true) -> false
   isa_false(false) -> true
   equal_sort[a0](s(x0), s(x1)) -> equal_sort[a0](x0, x1)
   equal_sort[a0](s(x0), 0) -> false
   equal_sort[a0](0, s(x0)) -> false
   equal_sort[a0](0, 0) -> true
   equal_sort[a44](witness_sort[a44], witness_sort[a44]) -> true
   if'(false, x33, y24) -> true
   if'(true, s(x5), y17) -> if'(gt(s(x5), y17), x5, y17)
   if'(true, 0, y17) -> false
   minus'(0, x1) -> false
   equal_bool(gt(s(x5), y3), true) -> true | minus'(s(x5), y3) -> minus'(x5, y3)
   equal_bool(gt(s(x5), y3), true) -> false | minus'(s(x5), y3) -> true
   gt(s(x), 0) -> true
   gt(s(x15), s(y10)) -> gt(x15, y10)
   gt(0, y31) -> false
   if(false, x33, y24) -> 0
   if(true, s(x5), y17) -> s(if(gt(s(x5), y17), x5, y17))
   if(true, 0, y17) -> s(0)
   ge(x50, 0) -> true
   ge(0, s(x59)) -> false
   ge(s(x68), s(y50)) -> ge(x68, y50)
   minus(0, x1) -> 0
   equal_bool(gt(s(x5), y3), true) -> true | minus(s(x5), y3) -> s(minus(x5, y3))
   equal_bool(gt(s(x5), y3), true) -> false | minus(s(x5), y3) -> 0


The following output was given by the internal theorem prover:
proof of internal
# AProVE Commit ID: 9a00b172b26c9abb2d4c4d5eaf341e919eb0fbf1 nowonder 20100222 unpublished dirty


Partial correctness of the following Program

   [x, x0, x1, x33, y24, x5, y17, y3, x15, y10, y31, x50, x59, x68, y50]
   equal_bool(true, false) -> false
   equal_bool(false, true) -> false
   equal_bool(true, true) -> true
   equal_bool(false, false) -> true
   true and x -> x
   false and x -> false
   true or x -> true
   false or x -> x
   not(false) -> true
   not(true) -> false
   isa_true(true) -> true
   isa_true(false) -> false
   isa_false(true) -> false
   isa_false(false) -> true
   equal_sort[a0](s(x0), s(x1)) -> equal_sort[a0](x0, x1)
   equal_sort[a0](s(x0), 0) -> false
   equal_sort[a0](0, s(x0)) -> false
   equal_sort[a0](0, 0) -> true
   equal_sort[a44](witness_sort[a44], witness_sort[a44]) -> true
   if'(false, x33, y24) -> true
   if'(true, s(x5), y17) -> if'(gt(s(x5), y17), x5, y17)
   if'(true, 0, y17) -> false
   minus'(0, x1) -> false
   equal_bool(gt(s(x5), y3), true) -> true | minus'(s(x5), y3) -> minus'(x5, y3)
   equal_bool(gt(s(x5), y3), true) -> false | minus'(s(x5), y3) -> true
   gt(s(x), 0) -> true
   gt(s(x15), s(y10)) -> gt(x15, y10)
   gt(0, y31) -> false
   if(false, x33, y24) -> 0
   if(true, s(x5), y17) -> s(if(gt(s(x5), y17), x5, y17))
   if(true, 0, y17) -> s(0)
   ge(x50, 0) -> true
   ge(0, s(x59)) -> false
   ge(s(x68), s(y50)) -> ge(x68, y50)
   minus(0, x1) -> 0
   equal_bool(gt(s(x5), y3), true) -> true | minus(s(x5), y3) -> s(minus(x5, y3))
   equal_bool(gt(s(x5), y3), true) -> false | minus(s(x5), y3) -> 0

using the following formula:
z0'':sort[a0],z1'':sort[a0].if'(gt(z0'', z1''), z0'', s(z1''))=true

could be successfully shown:
(0) Formula
(1) Induction by algorithm [EQUIVALENT]
(2) AND
    (3) Formula
        (4) Symbolic evaluation [EQUIVALENT]
        (5) Formula
        (6) Induction by data structure [EQUIVALENT]
        (7) AND
            (8) Formula
                (9) Symbolic evaluation under hypothesis [EQUIVALENT]
                (10) YES
            (11) Formula
                (12) Symbolic evaluation [EQUIVALENT]
                (13) YES
    (14) Formula
        (15) Symbolic evaluation [EQUIVALENT]
        (16) YES
    (17) Formula
        (18) Symbolic evaluation [EQUIVALENT]
        (19) Formula
        (20) Hypothesis Lifting [EQUIVALENT]
        (21) Formula
        (22) Inverse Substitution [SOUND]
        (23) Formula
        (24) Inverse Substitution [SOUND]
        (25) Formula
        (26) Induction by algorithm [EQUIVALENT]
        (27) AND
            (28) Formula
                (29) Symbolic evaluation [EQUIVALENT]
                (30) YES
            (31) Formula
                (32) Symbolic evaluation [EQUIVALENT]
                (33) YES
            (34) Formula
                (35) Symbolic evaluation under hypothesis [EQUIVALENT]
                (36) YES


----------------------------------------

(0)
Obligation:
Formula:
z0'':sort[a0],z1'':sort[a0].if'(gt(z0'', z1''), z0'', s(z1''))=true

There are no hypotheses.




----------------------------------------

(1) Induction by algorithm (EQUIVALENT)
Induction by algorithm gt(z0'', z1'') generates the following cases:

1. Base Case:
Formula:
x:sort[a0].if'(gt(s(x), 0), s(x), s(0))=true

There are no hypotheses.





2. Base Case:
Formula:
y31:sort[a0].if'(gt(0, y31), 0, s(y31))=true

There are no hypotheses.





1. Step Case:
Formula:
x15:sort[a0],y10:sort[a0].if'(gt(s(x15), s(y10)), s(x15), s(s(y10)))=true

Hypotheses:
x15:sort[a0],y10:sort[a0].if'(gt(x15, y10), x15, s(y10))=true






----------------------------------------

(2)
Complex Obligation (AND)

----------------------------------------

(3)
Obligation:
Formula:
x:sort[a0].if'(gt(s(x), 0), s(x), s(0))=true

There are no hypotheses.




----------------------------------------

(4) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
x:sort[a0].if'(gt(x, 0), x, s(0))=true
----------------------------------------

(5)
Obligation:
Formula:
x:sort[a0].if'(gt(x, 0), x, s(0))=true

There are no hypotheses.




----------------------------------------

(6) Induction by data structure (EQUIVALENT)
Induction by data structure sort[a0] generates the following cases:



1. Base Case:
Formula:
if'(gt(0, 0), 0, s(0))=true

There are no hypotheses.





1. Step Case:
Formula:
n:sort[a0].if'(gt(s(n), 0), s(n), s(0))=true

Hypotheses:
n:sort[a0].if'(gt(n, 0), n, s(0))=true






----------------------------------------

(7)
Complex Obligation (AND)

----------------------------------------

(8)
Obligation:
Formula:
n:sort[a0].if'(gt(s(n), 0), s(n), s(0))=true

Hypotheses:
n:sort[a0].if'(gt(n, 0), n, s(0))=true




----------------------------------------

(9) Symbolic evaluation under hypothesis (EQUIVALENT)
Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses:

n:sort[a0].if'(gt(n, 0), n, s(0))=true

----------------------------------------

(10)
YES

----------------------------------------

(11)
Obligation:
Formula:
if'(gt(0, 0), 0, s(0))=true

There are no hypotheses.




----------------------------------------

(12) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(13)
YES

----------------------------------------

(14)
Obligation:
Formula:
y31:sort[a0].if'(gt(0, y31), 0, s(y31))=true

There are no hypotheses.




----------------------------------------

(15) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(16)
YES

----------------------------------------

(17)
Obligation:
Formula:
x15:sort[a0],y10:sort[a0].if'(gt(s(x15), s(y10)), s(x15), s(s(y10)))=true

Hypotheses:
x15:sort[a0],y10:sort[a0].if'(gt(x15, y10), x15, s(y10))=true




----------------------------------------

(18) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
x15:sort[a0],y10:sort[a0].if'(gt(x15, y10), s(x15), s(s(y10)))=true
----------------------------------------

(19)
Obligation:
Formula:
x15:sort[a0],y10:sort[a0].if'(gt(x15, y10), s(x15), s(s(y10)))=true

Hypotheses:
x15:sort[a0],y10:sort[a0].if'(gt(x15, y10), x15, s(y10))=true




----------------------------------------

(20) Hypothesis Lifting (EQUIVALENT)
Formula could be generalised by hypothesis lifting to the following new obligation:
Formula:
x15:sort[a0],y10:sort[a0].(if'(gt(x15, y10), x15, s(y10))=true->if'(gt(x15, y10), s(x15), s(s(y10)))=true)

There are no hypotheses.




----------------------------------------

(21)
Obligation:
Formula:
x15:sort[a0],y10:sort[a0].(if'(gt(x15, y10), x15, s(y10))=true->if'(gt(x15, y10), s(x15), s(s(y10)))=true)

There are no hypotheses.




----------------------------------------

(22) Inverse Substitution (SOUND)
The formula could be generalised by inverse substitution to:
n:bool,x15:sort[a0],y10:sort[a0].(if'(n, x15, s(y10))=true->if'(n, s(x15), s(s(y10)))=true)

Inverse substitution used:
[gt(x15, y10)/n]


----------------------------------------

(23)
Obligation:
Formula:
n:bool,x15:sort[a0],y10:sort[a0].(if'(n, x15, s(y10))=true->if'(n, s(x15), s(s(y10)))=true)

There are no hypotheses.




----------------------------------------

(24) Inverse Substitution (SOUND)
The formula could be generalised by inverse substitution to:
n:bool,x15:sort[a0],n':sort[a0].(if'(n, x15, n')=true->if'(n, s(x15), s(n'))=true)

Inverse substitution used:
[s(y10)/n']


----------------------------------------

(25)
Obligation:
Formula:
n:bool,x15:sort[a0],n':sort[a0].(if'(n, x15, n')=true->if'(n, s(x15), s(n'))=true)

There are no hypotheses.




----------------------------------------

(26) Induction by algorithm (EQUIVALENT)
Induction by algorithm if'(n, x15, n') generates the following cases:

1. Base Case:
Formula:
x33:sort[a0],y24:sort[a0].(if'(false, x33, y24)=true->if'(false, s(x33), s(y24))=true)

There are no hypotheses.





2. Base Case:
Formula:
y17:sort[a0].(if'(true, 0, y17)=true->if'(true, s(0), s(y17))=true)

There are no hypotheses.





1. Step Case:
Formula:
x5:sort[a0],y17:sort[a0].(if'(true, s(x5), y17)=true->if'(true, s(s(x5)), s(y17))=true)

Hypotheses:
x5:sort[a0],y17:sort[a0].(if'(gt(s(x5), y17), x5, y17)=true->if'(gt(s(x5), y17), s(x5), s(y17))=true)






----------------------------------------

(27)
Complex Obligation (AND)

----------------------------------------

(28)
Obligation:
Formula:
x33:sort[a0],y24:sort[a0].(if'(false, x33, y24)=true->if'(false, s(x33), s(y24))=true)

There are no hypotheses.




----------------------------------------

(29) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(30)
YES

----------------------------------------

(31)
Obligation:
Formula:
y17:sort[a0].(if'(true, 0, y17)=true->if'(true, s(0), s(y17))=true)

There are no hypotheses.




----------------------------------------

(32) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(33)
YES

----------------------------------------

(34)
Obligation:
Formula:
x5:sort[a0],y17:sort[a0].(if'(true, s(x5), y17)=true->if'(true, s(s(x5)), s(y17))=true)

Hypotheses:
x5:sort[a0],y17:sort[a0].(if'(gt(s(x5), y17), x5, y17)=true->if'(gt(s(x5), y17), s(x5), s(y17))=true)




----------------------------------------

(35) Symbolic evaluation under hypothesis (EQUIVALENT)
Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses:

x5:sort[a0],y17:sort[a0].(if'(gt(s(x5), y17), x5, y17)=true->if'(gt(s(x5), y17), s(x5), s(y17))=true)

----------------------------------------

(36)
YES

(60) Complex Obligation (AND)

(61) Obligation:

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

GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))
IF1(false, s(z0), s(z1)) → IF3(true, s(z0), s(z1))
IF3(true, s(z0), s(z1)) → GCD(s(z0), if(gt(z1, z0), z1, s(z0)))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(62) DependencyGraphProof (EQUIVALENT transformation)

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

(63) Obligation:

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

IF1(false, s(z0), s(z1)) → IF3(true, s(z0), s(z1))
IF3(true, s(z0), s(z1)) → GCD(s(z0), if(gt(z1, z0), z1, s(z0)))
GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(64) Induction-Processor (SOUND transformation)


This DP could be deleted by the Induction-Processor:
IF3(true, s(z0'), s(z1')) → GCD(s(z0'), if(gt(z1', z0'), z1', s(z0')))


This order was computed:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(GCD(x1, x2)) = x2   
POL(IF1(x1, x2, x3)) = x3   
POL(IF3(x1, x2, x3)) = x3   
POL(false) = 0   
POL(ge(x1, x2)) = x2   
POL(gt(x1, x2)) = 0   
POL(if(x1, x2, x3)) = 1 + x2   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = 1 + x1   
POL(true) = 0   

At least one of these decreasing rules is always used after the deleted DP:
if(false, x332, y242) → 0


The following formula is valid:
z1':sort[a0],z0':sort[a0].if'(gt(z1' , z0' ), z1' , s(z0' ))=true


The transformed set:
minus'(s(x5), y3) → if'(gt(s(x5), y3), x5, y3)
if'(true, x24, y17) → minus'(x24, y17)
if'(false, x33, y24) → true
minus'(0, x1) → false
gt(s(x), 0) → true
minus(s(x5), y3) → if(gt(s(x5), y3), x5, y3)
gt(s(x15), s(y10)) → gt(x15, y10)
if(true, x24, y17) → s(minus(x24, y17))
if(false, x33, y24) → 0
gt(0, y31) → false
ge(x50, 0) → true
ge(0, s(x59)) → false
ge(s(x68), s(y50)) → ge(x68, y50)
minus(0, x1) → 0
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](0, s(x0)) → false
equal_sort[a0](0, 0) → true
equal_sort[a41](witness_sort[a41], witness_sort[a41]) → true


The proof given by the theorem prover:
The following program was given to the internal theorem prover:
   [x, x0, x1, x33, y24, x5, y17, y3, x15, y10, y31, x50, x59, x68, y50]
   equal_bool(true, false) -> false
   equal_bool(false, true) -> false
   equal_bool(true, true) -> true
   equal_bool(false, false) -> true
   true and x -> x
   false and x -> false
   true or x -> true
   false or x -> x
   not(false) -> true
   not(true) -> false
   isa_true(true) -> true
   isa_true(false) -> false
   isa_false(true) -> false
   isa_false(false) -> true
   equal_sort[a0](s(x0), s(x1)) -> equal_sort[a0](x0, x1)
   equal_sort[a0](s(x0), 0) -> false
   equal_sort[a0](0, s(x0)) -> false
   equal_sort[a0](0, 0) -> true
   equal_sort[a41](witness_sort[a41], witness_sort[a41]) -> true
   if'(false, x33, y24) -> true
   if'(true, s(x5), y17) -> if'(gt(s(x5), y17), x5, y17)
   if'(true, 0, y17) -> false
   minus'(0, x1) -> false
   equal_bool(gt(s(x5), y3), true) -> true | minus'(s(x5), y3) -> minus'(x5, y3)
   equal_bool(gt(s(x5), y3), true) -> false | minus'(s(x5), y3) -> true
   gt(s(x), 0) -> true
   gt(s(x15), s(y10)) -> gt(x15, y10)
   gt(0, y31) -> false
   if(false, x33, y24) -> 0
   if(true, s(x5), y17) -> s(if(gt(s(x5), y17), x5, y17))
   if(true, 0, y17) -> s(0)
   ge(x50, 0) -> true
   ge(0, s(x59)) -> false
   ge(s(x68), s(y50)) -> ge(x68, y50)
   minus(0, x1) -> 0
   equal_bool(gt(s(x5), y3), true) -> true | minus(s(x5), y3) -> s(minus(x5, y3))
   equal_bool(gt(s(x5), y3), true) -> false | minus(s(x5), y3) -> 0


The following output was given by the internal theorem prover:
proof of internal
# AProVE Commit ID: 9a00b172b26c9abb2d4c4d5eaf341e919eb0fbf1 nowonder 20100222 unpublished dirty


Partial correctness of the following Program

   [x, x0, x1, x33, y24, x5, y17, y3, x15, y10, y31, x50, x59, x68, y50]
   equal_bool(true, false) -> false
   equal_bool(false, true) -> false
   equal_bool(true, true) -> true
   equal_bool(false, false) -> true
   true and x -> x
   false and x -> false
   true or x -> true
   false or x -> x
   not(false) -> true
   not(true) -> false
   isa_true(true) -> true
   isa_true(false) -> false
   isa_false(true) -> false
   isa_false(false) -> true
   equal_sort[a0](s(x0), s(x1)) -> equal_sort[a0](x0, x1)
   equal_sort[a0](s(x0), 0) -> false
   equal_sort[a0](0, s(x0)) -> false
   equal_sort[a0](0, 0) -> true
   equal_sort[a41](witness_sort[a41], witness_sort[a41]) -> true
   if'(false, x33, y24) -> true
   if'(true, s(x5), y17) -> if'(gt(s(x5), y17), x5, y17)
   if'(true, 0, y17) -> false
   minus'(0, x1) -> false
   equal_bool(gt(s(x5), y3), true) -> true | minus'(s(x5), y3) -> minus'(x5, y3)
   equal_bool(gt(s(x5), y3), true) -> false | minus'(s(x5), y3) -> true
   gt(s(x), 0) -> true
   gt(s(x15), s(y10)) -> gt(x15, y10)
   gt(0, y31) -> false
   if(false, x33, y24) -> 0
   if(true, s(x5), y17) -> s(if(gt(s(x5), y17), x5, y17))
   if(true, 0, y17) -> s(0)
   ge(x50, 0) -> true
   ge(0, s(x59)) -> false
   ge(s(x68), s(y50)) -> ge(x68, y50)
   minus(0, x1) -> 0
   equal_bool(gt(s(x5), y3), true) -> true | minus(s(x5), y3) -> s(minus(x5, y3))
   equal_bool(gt(s(x5), y3), true) -> false | minus(s(x5), y3) -> 0

using the following formula:
z1':sort[a0],z0':sort[a0].if'(gt(z1', z0'), z1', s(z0'))=true

could be successfully shown:
(0) Formula
(1) Induction by algorithm [EQUIVALENT]
(2) AND
    (3) Formula
        (4) Symbolic evaluation [EQUIVALENT]
        (5) Formula
        (6) Induction by data structure [EQUIVALENT]
        (7) AND
            (8) Formula
                (9) Symbolic evaluation under hypothesis [EQUIVALENT]
                (10) YES
            (11) Formula
                (12) Symbolic evaluation [EQUIVALENT]
                (13) YES
    (14) Formula
        (15) Symbolic evaluation [EQUIVALENT]
        (16) YES
    (17) Formula
        (18) Symbolic evaluation [EQUIVALENT]
        (19) Formula
        (20) Hypothesis Lifting [EQUIVALENT]
        (21) Formula
        (22) Inverse Substitution [SOUND]
        (23) Formula
        (24) Inverse Substitution [SOUND]
        (25) Formula
        (26) Induction by algorithm [EQUIVALENT]
        (27) AND
            (28) Formula
                (29) Symbolic evaluation [EQUIVALENT]
                (30) YES
            (31) Formula
                (32) Symbolic evaluation [EQUIVALENT]
                (33) YES
            (34) Formula
                (35) Symbolic evaluation under hypothesis [EQUIVALENT]
                (36) YES


----------------------------------------

(0)
Obligation:
Formula:
z1':sort[a0],z0':sort[a0].if'(gt(z1', z0'), z1', s(z0'))=true

There are no hypotheses.




----------------------------------------

(1) Induction by algorithm (EQUIVALENT)
Induction by algorithm gt(z1', z0') generates the following cases:

1. Base Case:
Formula:
x:sort[a0].if'(gt(s(x), 0), s(x), s(0))=true

There are no hypotheses.





2. Base Case:
Formula:
y31:sort[a0].if'(gt(0, y31), 0, s(y31))=true

There are no hypotheses.





1. Step Case:
Formula:
x15:sort[a0],y10:sort[a0].if'(gt(s(x15), s(y10)), s(x15), s(s(y10)))=true

Hypotheses:
x15:sort[a0],y10:sort[a0].if'(gt(x15, y10), x15, s(y10))=true






----------------------------------------

(2)
Complex Obligation (AND)

----------------------------------------

(3)
Obligation:
Formula:
x:sort[a0].if'(gt(s(x), 0), s(x), s(0))=true

There are no hypotheses.




----------------------------------------

(4) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
x:sort[a0].if'(gt(x, 0), x, s(0))=true
----------------------------------------

(5)
Obligation:
Formula:
x:sort[a0].if'(gt(x, 0), x, s(0))=true

There are no hypotheses.




----------------------------------------

(6) Induction by data structure (EQUIVALENT)
Induction by data structure sort[a0] generates the following cases:



1. Base Case:
Formula:
if'(gt(0, 0), 0, s(0))=true

There are no hypotheses.





1. Step Case:
Formula:
n:sort[a0].if'(gt(s(n), 0), s(n), s(0))=true

Hypotheses:
n:sort[a0].if'(gt(n, 0), n, s(0))=true






----------------------------------------

(7)
Complex Obligation (AND)

----------------------------------------

(8)
Obligation:
Formula:
n:sort[a0].if'(gt(s(n), 0), s(n), s(0))=true

Hypotheses:
n:sort[a0].if'(gt(n, 0), n, s(0))=true




----------------------------------------

(9) Symbolic evaluation under hypothesis (EQUIVALENT)
Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses:

n:sort[a0].if'(gt(n, 0), n, s(0))=true

----------------------------------------

(10)
YES

----------------------------------------

(11)
Obligation:
Formula:
if'(gt(0, 0), 0, s(0))=true

There are no hypotheses.




----------------------------------------

(12) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(13)
YES

----------------------------------------

(14)
Obligation:
Formula:
y31:sort[a0].if'(gt(0, y31), 0, s(y31))=true

There are no hypotheses.




----------------------------------------

(15) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(16)
YES

----------------------------------------

(17)
Obligation:
Formula:
x15:sort[a0],y10:sort[a0].if'(gt(s(x15), s(y10)), s(x15), s(s(y10)))=true

Hypotheses:
x15:sort[a0],y10:sort[a0].if'(gt(x15, y10), x15, s(y10))=true




----------------------------------------

(18) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
x15:sort[a0],y10:sort[a0].if'(gt(x15, y10), s(x15), s(s(y10)))=true
----------------------------------------

(19)
Obligation:
Formula:
x15:sort[a0],y10:sort[a0].if'(gt(x15, y10), s(x15), s(s(y10)))=true

Hypotheses:
x15:sort[a0],y10:sort[a0].if'(gt(x15, y10), x15, s(y10))=true




----------------------------------------

(20) Hypothesis Lifting (EQUIVALENT)
Formula could be generalised by hypothesis lifting to the following new obligation:
Formula:
x15:sort[a0],y10:sort[a0].(if'(gt(x15, y10), x15, s(y10))=true->if'(gt(x15, y10), s(x15), s(s(y10)))=true)

There are no hypotheses.




----------------------------------------

(21)
Obligation:
Formula:
x15:sort[a0],y10:sort[a0].(if'(gt(x15, y10), x15, s(y10))=true->if'(gt(x15, y10), s(x15), s(s(y10)))=true)

There are no hypotheses.




----------------------------------------

(22) Inverse Substitution (SOUND)
The formula could be generalised by inverse substitution to:
n:bool,x15:sort[a0],y10:sort[a0].(if'(n, x15, s(y10))=true->if'(n, s(x15), s(s(y10)))=true)

Inverse substitution used:
[gt(x15, y10)/n]


----------------------------------------

(23)
Obligation:
Formula:
n:bool,x15:sort[a0],y10:sort[a0].(if'(n, x15, s(y10))=true->if'(n, s(x15), s(s(y10)))=true)

There are no hypotheses.




----------------------------------------

(24) Inverse Substitution (SOUND)
The formula could be generalised by inverse substitution to:
n:bool,x15:sort[a0],n':sort[a0].(if'(n, x15, n')=true->if'(n, s(x15), s(n'))=true)

Inverse substitution used:
[s(y10)/n']


----------------------------------------

(25)
Obligation:
Formula:
n:bool,x15:sort[a0],n':sort[a0].(if'(n, x15, n')=true->if'(n, s(x15), s(n'))=true)

There are no hypotheses.




----------------------------------------

(26) Induction by algorithm (EQUIVALENT)
Induction by algorithm if'(n, x15, n') generates the following cases:

1. Base Case:
Formula:
x33:sort[a0],y24:sort[a0].(if'(false, x33, y24)=true->if'(false, s(x33), s(y24))=true)

There are no hypotheses.





2. Base Case:
Formula:
y17:sort[a0].(if'(true, 0, y17)=true->if'(true, s(0), s(y17))=true)

There are no hypotheses.





1. Step Case:
Formula:
x5:sort[a0],y17:sort[a0].(if'(true, s(x5), y17)=true->if'(true, s(s(x5)), s(y17))=true)

Hypotheses:
x5:sort[a0],y17:sort[a0].(if'(gt(s(x5), y17), x5, y17)=true->if'(gt(s(x5), y17), s(x5), s(y17))=true)






----------------------------------------

(27)
Complex Obligation (AND)

----------------------------------------

(28)
Obligation:
Formula:
x33:sort[a0],y24:sort[a0].(if'(false, x33, y24)=true->if'(false, s(x33), s(y24))=true)

There are no hypotheses.




----------------------------------------

(29) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(30)
YES

----------------------------------------

(31)
Obligation:
Formula:
y17:sort[a0].(if'(true, 0, y17)=true->if'(true, s(0), s(y17))=true)

There are no hypotheses.




----------------------------------------

(32) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(33)
YES

----------------------------------------

(34)
Obligation:
Formula:
x5:sort[a0],y17:sort[a0].(if'(true, s(x5), y17)=true->if'(true, s(s(x5)), s(y17))=true)

Hypotheses:
x5:sort[a0],y17:sort[a0].(if'(gt(s(x5), y17), x5, y17)=true->if'(gt(s(x5), y17), s(x5), s(y17))=true)




----------------------------------------

(35) Symbolic evaluation under hypothesis (EQUIVALENT)
Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses:

x5:sort[a0],y17:sort[a0].(if'(gt(s(x5), y17), x5, y17)=true->if'(gt(s(x5), y17), s(x5), s(y17))=true)

----------------------------------------

(36)
YES

(65) Complex Obligation (AND)

(66) Obligation:

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

IF1(false, s(z0), s(z1)) → IF3(true, s(z0), s(z1))
GCD(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))

The TRS R consists of the following rules:

minus(s(x), y) → if(gt(s(x), y), x, y)
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
gt(0, y) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

minus(s(x0), x1)
if(true, x0, x1)
if(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(67) DependencyGraphProof (EQUIVALENT transformation)

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

(68) TRUE

(69) Obligation:

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

minus'(s(x5), y3) → if'(gt(s(x5), y3), x5, y3)
if'(true, x24, y17) → minus'(x24, y17)
if'(false, x33, y24) → true
minus'(0, x1) → false
gt(s(x), 0) → true
minus(s(x5), y3) → if(gt(s(x5), y3), x5, y3)
gt(s(x15), s(y10)) → gt(x15, y10)
if(true, x24, y17) → s(minus(x24, y17))
if(false, x33, y24) → 0
gt(0, y31) → false
ge(x50, 0) → true
ge(0, s(x59)) → false
ge(s(x68), s(y50)) → ge(x68, y50)
minus(0, x1) → 0
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](0, s(x0)) → false
equal_sort[a0](0, 0) → true
equal_sort[a41](witness_sort[a41], witness_sort[a41]) → true

Q is empty.

(70) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Combined order from the following AFS and order.
minus'(x1, x2)  =  minus'(x1, x2)
s(x1)  =  s(x1)
if'(x1, x2, x3)  =  if'(x1, x2, x3)
gt(x1, x2)  =  gt(x1, x2)
true  =  true
false  =  false
0  =  0
minus(x1, x2)  =  minus(x1, x2)
if(x1, x2, x3)  =  if(x1, x2, x3)
ge(x1, x2)  =  ge(x1, x2)
equal_bool(x1, x2)  =  equal_bool(x1, x2)
and(x1, x2)  =  and(x1, x2)
or(x1, x2)  =  or(x1, x2)
not(x1)  =  x1
isa_true(x1)  =  x1
isa_false(x1)  =  isa_false(x1)
equal_sort[a0](x1, x2)  =  equal_sort[a0](x1, x2)
equal_sort[a41](x1, x2)  =  equal_sort[a41](x1, x2)
witness_sort[a41]  =  witness_sort[a41]

Recursive path order with status [RPO].
Quasi-Precedence:
[true, false, 0, and2, equalsort[a41]2] > [minus2, if3] > s1 > [minus'2, if'3] > gt2
ge2 > gt2
equalbool2 > gt2
or2 > gt2
isafalse1 > gt2
equalsort[a0]2 > gt2
witnesssort[a41] > gt2

Status:
minus'2: [1,2]
s1: multiset
if'3: [2,3,1]
gt2: [1,2]
true: multiset
false: multiset
0: multiset
minus2: [1,2]
if3: [2,3,1]
ge2: [2,1]
equalbool2: multiset
and2: multiset
or2: multiset
isafalse1: multiset
equalsort[a0]2: [2,1]
equalsort[a41]2: [1,2]
witnesssort[a41]: multiset

With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

minus'(s(x5), y3) → if'(gt(s(x5), y3), x5, y3)
if'(true, x24, y17) → minus'(x24, y17)
if'(false, x33, y24) → true
minus'(0, x1) → false
gt(s(x), 0) → true
minus(s(x5), y3) → if(gt(s(x5), y3), x5, y3)
gt(s(x15), s(y10)) → gt(x15, y10)
if(true, x24, y17) → s(minus(x24, y17))
if(false, x33, y24) → 0
gt(0, y31) → false
ge(x50, 0) → true
ge(0, s(x59)) → false
ge(s(x68), s(y50)) → ge(x68, y50)
minus(0, x1) → 0
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
isa_false(true) → false
isa_false(false) → true
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](0, s(x0)) → false
equal_sort[a0](0, 0) → true
equal_sort[a41](witness_sort[a41], witness_sort[a41]) → true


(71) Obligation:

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

not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false

Q is empty.

(72) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(false) = 1   
POL(isa_true(x1)) = 2 + 2·x1   
POL(not(x1)) = 2 + 2·x1   
POL(true) = 1   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false


(73) Obligation:

Q restricted rewrite system:
R is empty.
Q is empty.

(74) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(75) YES

(76) Obligation:

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

minus'(s(x5), y3) → if'(gt(s(x5), y3), x5, y3)
if'(true, x24, y17) → minus'(x24, y17)
if'(false, x33, y24) → true
minus'(0, x1) → false
gt(s(x), 0) → true
minus(s(x5), y3) → if(gt(s(x5), y3), x5, y3)
gt(s(x15), s(y10)) → gt(x15, y10)
if(true, x24, y17) → s(minus(x24, y17))
if(false, x33, y24) → 0
gt(0, y31) → false
ge(x50, 0) → true
ge(0, s(x59)) → false
ge(s(x68), s(y50)) → ge(x68, y50)
minus(0, x1) → 0
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](0, s(x0)) → false
equal_sort[a0](0, 0) → true
equal_sort[a44](witness_sort[a44], witness_sort[a44]) → true

Q is empty.

(77) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Recursive path order with status [RPO].
Quasi-Precedence:
[false, 0, equalbool2, not1, isafalse1] > true > [minus2, if3] > s1 > [minus'2, if'3] > gt2
[false, 0, equalbool2, not1, isafalse1] > true > [minus2, if3] > s1 > ge2 > gt2
and2 > gt2
or2 > gt2
isatrue1 > gt2
equalsort[a0]2 > true > [minus2, if3] > s1 > [minus'2, if'3] > gt2
equalsort[a0]2 > true > [minus2, if3] > s1 > ge2 > gt2
equalsort[a44]2 > gt2
witnesssort[a44] > true > [minus2, if3] > s1 > [minus'2, if'3] > gt2
witnesssort[a44] > true > [minus2, if3] > s1 > ge2 > gt2

Status:
minus'2: [1,2]
s1: multiset
if'3: [2,3,1]
gt2: [2,1]
true: multiset
false: multiset
0: multiset
minus2: [2,1]
if3: [3,2,1]
ge2: [2,1]
equalbool2: multiset
and2: multiset
or2: [2,1]
not1: [1]
isatrue1: [1]
isafalse1: [1]
equalsort[a0]2: [1,2]
equalsort[a44]2: [2,1]
witnesssort[a44]: multiset

With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

minus'(s(x5), y3) → if'(gt(s(x5), y3), x5, y3)
if'(true, x24, y17) → minus'(x24, y17)
if'(false, x33, y24) → true
minus'(0, x1) → false
gt(s(x), 0) → true
minus(s(x5), y3) → if(gt(s(x5), y3), x5, y3)
gt(s(x15), s(y10)) → gt(x15, y10)
if(true, x24, y17) → s(minus(x24, y17))
if(false, x33, y24) → 0
gt(0, y31) → false
ge(x50, 0) → true
ge(0, s(x59)) → false
ge(s(x68), s(y50)) → ge(x68, y50)
minus(0, x1) → 0
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](0, s(x0)) → false
equal_sort[a0](0, 0) → true
equal_sort[a44](witness_sort[a44], witness_sort[a44]) → true


(78) Obligation:

Q restricted rewrite system:
R is empty.
Q is empty.

(79) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(80) YES