(0) Obligation:

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

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, x) → 0
minus(s(x), s(y)) → minus(x, y)
gcd(0, y) → y
gcd(s(x), 0) → s(x)
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_gcd(true, x, y) → gcd(minus(x, y), y)
if_gcd(false, x, y) → gcd(minus(y, x), x)

Q is empty.

(1) Overlay + Local Confluence (EQUIVALENT transformation)

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

(2) Obligation:

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

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, x) → 0
minus(s(x), s(y)) → minus(x, y)
gcd(0, y) → y
gcd(s(x), 0) → s(x)
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_gcd(true, x, y) → gcd(minus(x, y), y)
if_gcd(false, x, y) → gcd(minus(y, x), x)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
gcd(0, x0)
gcd(s(x0), 0)
gcd(s(x0), s(x1))
if_gcd(true, x0, x1)
if_gcd(false, x0, 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:

LE(s(x), s(y)) → LE(x, y)
MINUS(s(x), s(y)) → MINUS(x, y)
GCD(s(x), s(y)) → IF_GCD(le(y, x), s(x), s(y))
GCD(s(x), s(y)) → LE(y, x)
IF_GCD(true, x, y) → GCD(minus(x, y), y)
IF_GCD(true, x, y) → MINUS(x, y)
IF_GCD(false, x, y) → GCD(minus(y, x), x)
IF_GCD(false, x, y) → MINUS(y, x)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, x) → 0
minus(s(x), s(y)) → minus(x, y)
gcd(0, y) → y
gcd(s(x), 0) → s(x)
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_gcd(true, x, y) → gcd(minus(x, y), y)
if_gcd(false, x, y) → gcd(minus(y, x), x)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
gcd(0, x0)
gcd(s(x0), 0)
gcd(s(x0), s(x1))
if_gcd(true, x0, x1)
if_gcd(false, x0, 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 3 SCCs with 3 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:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, x) → 0
minus(s(x), s(y)) → minus(x, y)
gcd(0, y) → y
gcd(s(x), 0) → s(x)
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_gcd(true, x, y) → gcd(minus(x, y), y)
if_gcd(false, x, y) → gcd(minus(y, x), x)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
gcd(0, x0)
gcd(s(x0), 0)
gcd(s(x0), s(x1))
if_gcd(true, x0, x1)
if_gcd(false, x0, 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:

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

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

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
gcd(0, x0)
gcd(s(x0), 0)
gcd(s(x0), s(x1))
if_gcd(true, x0, x1)
if_gcd(false, x0, 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].

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
gcd(0, x0)
gcd(s(x0), 0)
gcd(s(x0), s(x1))
if_gcd(true, x0, x1)
if_gcd(false, x0, x1)

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

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, x) → 0
minus(s(x), s(y)) → minus(x, y)
gcd(0, y) → y
gcd(s(x), 0) → s(x)
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_gcd(true, x, y) → gcd(minus(x, y), y)
if_gcd(false, x, y) → gcd(minus(y, x), x)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
gcd(0, x0)
gcd(s(x0), 0)
gcd(s(x0), s(x1))
if_gcd(true, x0, x1)
if_gcd(false, x0, 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:

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

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

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
gcd(0, x0)
gcd(s(x0), 0)
gcd(s(x0), s(x1))
if_gcd(true, x0, x1)
if_gcd(false, x0, 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].

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
gcd(0, x0)
gcd(s(x0), 0)
gcd(s(x0), s(x1))
if_gcd(true, x0, x1)
if_gcd(false, x0, x1)

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

GCD(s(x), s(y)) → IF_GCD(le(y, x), s(x), s(y))
IF_GCD(true, x, y) → GCD(minus(x, y), y)
IF_GCD(false, x, y) → GCD(minus(y, x), x)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, x) → 0
minus(s(x), s(y)) → minus(x, y)
gcd(0, y) → y
gcd(s(x), 0) → s(x)
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_gcd(true, x, y) → gcd(minus(x, y), y)
if_gcd(false, x, y) → gcd(minus(y, x), x)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
gcd(0, x0)
gcd(s(x0), 0)
gcd(s(x0), s(x1))
if_gcd(true, x0, x1)
if_gcd(false, x0, 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:

GCD(s(x), s(y)) → IF_GCD(le(y, x), s(x), s(y))
IF_GCD(true, x, y) → GCD(minus(x, y), y)
IF_GCD(false, x, y) → GCD(minus(y, x), x)

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
minus(x0, 0)
minus(0, x0)
minus(s(x0), s(x1))
gcd(0, x0)
gcd(s(x0), 0)
gcd(s(x0), s(x1))
if_gcd(true, x0, x1)
if_gcd(false, x0, 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].

gcd(0, x0)
gcd(s(x0), 0)
gcd(s(x0), s(x1))
if_gcd(true, x0, x1)
if_gcd(false, x0, x1)

(25) Obligation:

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

GCD(s(x), s(y)) → IF_GCD(le(y, x), s(x), s(y))
IF_GCD(true, x, y) → GCD(minus(x, y), y)
IF_GCD(false, x, y) → GCD(minus(y, x), x)

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

(26) NonInfProof (EQUIVALENT transformation)

The DP Problem is simplified using the Induction Calculus [NONINF] with the following steps:
Note that final constraints are written in bold face.


For Pair GCD(s(x), s(y)) → IF_GCD(le(y, x), s(x), s(y)) the following chains were created:
  • We consider the chain IF_GCD(true, x, y) → GCD(minus(x, y), y), GCD(s(x), s(y)) → IF_GCD(le(y, x), s(x), s(y)) which results in the following constraint:

    (1)    (GCD(minus(x2, x3), x3)=GCD(s(x4), s(x5)) ⇒ GCD(s(x4), s(x5))≥IF_GCD(le(x5, x4), s(x4), s(x5)))



    We simplified constraint (1) using rules (I), (II), (III), (VII) which results in the following new constraint:

    (2)    (s(x5)=x26minus(x2, x26)=s(x4) ⇒ GCD(s(x4), s(x5))≥IF_GCD(le(x5, x4), s(x4), s(x5)))



    We simplified constraint (2) using rule (V) (with possible (I) afterwards) using induction on minus(x2, x26)=s(x4) which results in the following new constraints:

    (3)    (x27=s(x4)∧s(x5)=0GCD(s(x4), s(x5))≥IF_GCD(le(x5, x4), s(x4), s(x5)))


    (4)    (minus(x30, x29)=s(x4)∧s(x5)=s(x29)∧(∀x31,x32:minus(x30, x29)=s(x31)∧s(x32)=x29GCD(s(x31), s(x32))≥IF_GCD(le(x32, x31), s(x31), s(x32))) ⇒ GCD(s(x4), s(x5))≥IF_GCD(le(x5, x4), s(x4), s(x5)))



    We solved constraint (3) using rules (I), (II).We simplified constraint (4) using rules (I), (II), (III), (IV) which results in the following new constraint:

    (5)    (minus(x30, x29)=s(x4) ⇒ GCD(s(x4), s(x29))≥IF_GCD(le(x29, x4), s(x4), s(x29)))



    We simplified constraint (5) using rule (V) (with possible (I) afterwards) using induction on minus(x30, x29)=s(x4) which results in the following new constraints:

    (6)    (x33=s(x4) ⇒ GCD(s(x4), s(0))≥IF_GCD(le(0, x4), s(x4), s(0)))


    (7)    (minus(x36, x35)=s(x4)∧(∀x37:minus(x36, x35)=s(x37) ⇒ GCD(s(x37), s(x35))≥IF_GCD(le(x35, x37), s(x37), s(x35))) ⇒ GCD(s(x4), s(s(x35)))≥IF_GCD(le(s(x35), x4), s(x4), s(s(x35))))



    We simplified constraint (6) using rule (III) which results in the following new constraint:

    (8)    (GCD(s(x4), s(0))≥IF_GCD(le(0, x4), s(x4), s(0)))



    We simplified constraint (7) using rule (VI) where we applied the induction hypothesis (∀x37:minus(x36, x35)=s(x37) ⇒ GCD(s(x37), s(x35))≥IF_GCD(le(x35, x37), s(x37), s(x35))) with σ = [x37 / x4] which results in the following new constraint:

    (9)    (GCD(s(x4), s(x35))≥IF_GCD(le(x35, x4), s(x4), s(x35)) ⇒ GCD(s(x4), s(s(x35)))≥IF_GCD(le(s(x35), x4), s(x4), s(s(x35))))



  • We consider the chain IF_GCD(false, x, y) → GCD(minus(y, x), x), GCD(s(x), s(y)) → IF_GCD(le(y, x), s(x), s(y)) which results in the following constraint:

    (10)    (GCD(minus(x7, x6), x6)=GCD(s(x8), s(x9)) ⇒ GCD(s(x8), s(x9))≥IF_GCD(le(x9, x8), s(x8), s(x9)))



    We simplified constraint (10) using rules (I), (II), (III), (VII) which results in the following new constraint:

    (11)    (s(x9)=x38minus(x7, x38)=s(x8) ⇒ GCD(s(x8), s(x9))≥IF_GCD(le(x9, x8), s(x8), s(x9)))



    We simplified constraint (11) using rule (V) (with possible (I) afterwards) using induction on minus(x7, x38)=s(x8) which results in the following new constraints:

    (12)    (x39=s(x8)∧s(x9)=0GCD(s(x8), s(x9))≥IF_GCD(le(x9, x8), s(x8), s(x9)))


    (13)    (minus(x42, x41)=s(x8)∧s(x9)=s(x41)∧(∀x43,x44:minus(x42, x41)=s(x43)∧s(x44)=x41GCD(s(x43), s(x44))≥IF_GCD(le(x44, x43), s(x43), s(x44))) ⇒ GCD(s(x8), s(x9))≥IF_GCD(le(x9, x8), s(x8), s(x9)))



    We solved constraint (12) using rules (I), (II).We simplified constraint (13) using rules (I), (II), (III), (IV) which results in the following new constraint:

    (14)    (minus(x42, x41)=s(x8) ⇒ GCD(s(x8), s(x41))≥IF_GCD(le(x41, x8), s(x8), s(x41)))



    We simplified constraint (14) using rule (V) (with possible (I) afterwards) using induction on minus(x42, x41)=s(x8) which results in the following new constraints:

    (15)    (x45=s(x8) ⇒ GCD(s(x8), s(0))≥IF_GCD(le(0, x8), s(x8), s(0)))


    (16)    (minus(x48, x47)=s(x8)∧(∀x49:minus(x48, x47)=s(x49) ⇒ GCD(s(x49), s(x47))≥IF_GCD(le(x47, x49), s(x49), s(x47))) ⇒ GCD(s(x8), s(s(x47)))≥IF_GCD(le(s(x47), x8), s(x8), s(s(x47))))



    We simplified constraint (15) using rule (III) which results in the following new constraint:

    (17)    (GCD(s(x8), s(0))≥IF_GCD(le(0, x8), s(x8), s(0)))



    We simplified constraint (16) using rule (VI) where we applied the induction hypothesis (∀x49:minus(x48, x47)=s(x49) ⇒ GCD(s(x49), s(x47))≥IF_GCD(le(x47, x49), s(x49), s(x47))) with σ = [x49 / x8] which results in the following new constraint:

    (18)    (GCD(s(x8), s(x47))≥IF_GCD(le(x47, x8), s(x8), s(x47)) ⇒ GCD(s(x8), s(s(x47)))≥IF_GCD(le(s(x47), x8), s(x8), s(s(x47))))







For Pair IF_GCD(true, x, y) → GCD(minus(x, y), y) the following chains were created:
  • We consider the chain GCD(s(x), s(y)) → IF_GCD(le(y, x), s(x), s(y)), IF_GCD(true, x, y) → GCD(minus(x, y), y) which results in the following constraint:

    (19)    (IF_GCD(le(x11, x10), s(x10), s(x11))=IF_GCD(true, x12, x13) ⇒ IF_GCD(true, x12, x13)≥GCD(minus(x12, x13), x13))



    We simplified constraint (19) using rules (I), (II), (III) which results in the following new constraint:

    (20)    (le(x11, x10)=trueIF_GCD(true, s(x10), s(x11))≥GCD(minus(s(x10), s(x11)), s(x11)))



    We simplified constraint (20) using rule (V) (with possible (I) afterwards) using induction on le(x11, x10)=true which results in the following new constraints:

    (21)    (true=trueIF_GCD(true, s(x50), s(0))≥GCD(minus(s(x50), s(0)), s(0)))


    (22)    (le(x53, x52)=true∧(le(x53, x52)=trueIF_GCD(true, s(x52), s(x53))≥GCD(minus(s(x52), s(x53)), s(x53))) ⇒ IF_GCD(true, s(s(x52)), s(s(x53)))≥GCD(minus(s(s(x52)), s(s(x53))), s(s(x53))))



    We simplified constraint (21) using rules (I), (II) which results in the following new constraint:

    (23)    (IF_GCD(true, s(x50), s(0))≥GCD(minus(s(x50), s(0)), s(0)))



    We simplified constraint (22) using rule (VI) where we applied the induction hypothesis (le(x53, x52)=trueIF_GCD(true, s(x52), s(x53))≥GCD(minus(s(x52), s(x53)), s(x53))) with σ = [ ] which results in the following new constraint:

    (24)    (IF_GCD(true, s(x52), s(x53))≥GCD(minus(s(x52), s(x53)), s(x53)) ⇒ IF_GCD(true, s(s(x52)), s(s(x53)))≥GCD(minus(s(s(x52)), s(s(x53))), s(s(x53))))







For Pair IF_GCD(false, x, y) → GCD(minus(y, x), x) the following chains were created:
  • We consider the chain GCD(s(x), s(y)) → IF_GCD(le(y, x), s(x), s(y)), IF_GCD(false, x, y) → GCD(minus(y, x), x) which results in the following constraint:

    (25)    (IF_GCD(le(x19, x18), s(x18), s(x19))=IF_GCD(false, x20, x21) ⇒ IF_GCD(false, x20, x21)≥GCD(minus(x21, x20), x20))



    We simplified constraint (25) using rules (I), (II), (III) which results in the following new constraint:

    (26)    (le(x19, x18)=falseIF_GCD(false, s(x18), s(x19))≥GCD(minus(s(x19), s(x18)), s(x18)))



    We simplified constraint (26) using rule (V) (with possible (I) afterwards) using induction on le(x19, x18)=false which results in the following new constraints:

    (27)    (false=falseIF_GCD(false, s(0), s(s(x55)))≥GCD(minus(s(s(x55)), s(0)), s(0)))


    (28)    (le(x57, x56)=false∧(le(x57, x56)=falseIF_GCD(false, s(x56), s(x57))≥GCD(minus(s(x57), s(x56)), s(x56))) ⇒ IF_GCD(false, s(s(x56)), s(s(x57)))≥GCD(minus(s(s(x57)), s(s(x56))), s(s(x56))))



    We simplified constraint (27) using rules (I), (II) which results in the following new constraint:

    (29)    (IF_GCD(false, s(0), s(s(x55)))≥GCD(minus(s(s(x55)), s(0)), s(0)))



    We simplified constraint (28) using rule (VI) where we applied the induction hypothesis (le(x57, x56)=falseIF_GCD(false, s(x56), s(x57))≥GCD(minus(s(x57), s(x56)), s(x56))) with σ = [ ] which results in the following new constraint:

    (30)    (IF_GCD(false, s(x56), s(x57))≥GCD(minus(s(x57), s(x56)), s(x56)) ⇒ IF_GCD(false, s(s(x56)), s(s(x57)))≥GCD(minus(s(s(x57)), s(s(x56))), s(s(x56))))







To summarize, we get the following constraints P for the following pairs.
  • GCD(s(x), s(y)) → IF_GCD(le(y, x), s(x), s(y))
    • (GCD(s(x4), s(0))≥IF_GCD(le(0, x4), s(x4), s(0)))
    • (GCD(s(x4), s(x35))≥IF_GCD(le(x35, x4), s(x4), s(x35)) ⇒ GCD(s(x4), s(s(x35)))≥IF_GCD(le(s(x35), x4), s(x4), s(s(x35))))
    • (GCD(s(x8), s(0))≥IF_GCD(le(0, x8), s(x8), s(0)))
    • (GCD(s(x8), s(x47))≥IF_GCD(le(x47, x8), s(x8), s(x47)) ⇒ GCD(s(x8), s(s(x47)))≥IF_GCD(le(s(x47), x8), s(x8), s(s(x47))))

  • IF_GCD(true, x, y) → GCD(minus(x, y), y)
    • (IF_GCD(true, s(x50), s(0))≥GCD(minus(s(x50), s(0)), s(0)))
    • (IF_GCD(true, s(x52), s(x53))≥GCD(minus(s(x52), s(x53)), s(x53)) ⇒ IF_GCD(true, s(s(x52)), s(s(x53)))≥GCD(minus(s(s(x52)), s(s(x53))), s(s(x53))))

  • IF_GCD(false, x, y) → GCD(minus(y, x), x)
    • (IF_GCD(false, s(0), s(s(x55)))≥GCD(minus(s(s(x55)), s(0)), s(0)))
    • (IF_GCD(false, s(x56), s(x57))≥GCD(minus(s(x57), s(x56)), s(x56)) ⇒ IF_GCD(false, s(s(x56)), s(s(x57)))≥GCD(minus(s(s(x57)), s(s(x56))), s(s(x56))))




The constraints for P> respective Pbound are constructed from P where we just replace every occurence of "t ≥ s" in P by "t > s" respective "t ≥ c". Here c stands for the fresh constant used for Pbound.
Using the following integer polynomial ordering the resulting constraints can be solved
Polynomial interpretation [NONINF]:

POL(0) = 0   
POL(GCD(x1, x2)) = -1 + x2   
POL(IF_GCD(x1, x2, x3)) = -1 - x1 + x3   
POL(c) = -1   
POL(false) = 0   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = 0   
POL(s(x1)) = 1 + x1   
POL(true) = 0   

The following pairs are in P>:

IF_GCD(false, x, y) → GCD(minus(y, x), x)
The following pairs are in Pbound:

GCD(s(x), s(y)) → IF_GCD(le(y, x), s(x), s(y))
IF_GCD(true, x, y) → GCD(minus(x, y), y)
IF_GCD(false, x, y) → GCD(minus(y, x), x)
The following rules are usable:

falsele(s(x), 0)
le(x, y) → le(s(x), s(y))
truele(0, y)

(27) Obligation:

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

GCD(s(x), s(y)) → IF_GCD(le(y, x), s(x), s(y))
IF_GCD(true, x, y) → GCD(minus(x, y), y)

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

(28) Narrowing (EQUIVALENT transformation)

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

GCD(s(x0), s(0)) → IF_GCD(true, s(x0), s(0))
GCD(s(0), s(s(x0))) → IF_GCD(false, s(0), s(s(x0)))
GCD(s(s(x1)), s(s(x0))) → IF_GCD(le(x0, x1), s(s(x1)), s(s(x0)))

(29) Obligation:

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

IF_GCD(true, x, y) → GCD(minus(x, y), y)
GCD(s(x0), s(0)) → IF_GCD(true, s(x0), s(0))
GCD(s(0), s(s(x0))) → IF_GCD(false, s(0), s(s(x0)))
GCD(s(s(x1)), s(s(x0))) → IF_GCD(le(x0, x1), s(s(x1)), s(s(x0)))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

(30) DependencyGraphProof (EQUIVALENT transformation)

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

(31) Obligation:

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

GCD(s(x0), s(0)) → IF_GCD(true, s(x0), s(0))
IF_GCD(true, x, y) → GCD(minus(x, y), y)
GCD(s(s(x1)), s(s(x0))) → IF_GCD(le(x0, x1), s(s(x1)), s(s(x0)))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

(32) Narrowing (EQUIVALENT transformation)

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

IF_GCD(true, x0, 0) → GCD(x0, 0)
IF_GCD(true, 0, x0) → GCD(0, x0)
IF_GCD(true, s(x0), s(x1)) → GCD(minus(x0, x1), s(x1))

(33) Obligation:

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

GCD(s(x0), s(0)) → IF_GCD(true, s(x0), s(0))
GCD(s(s(x1)), s(s(x0))) → IF_GCD(le(x0, x1), s(s(x1)), s(s(x0)))
IF_GCD(true, x0, 0) → GCD(x0, 0)
IF_GCD(true, 0, x0) → GCD(0, x0)
IF_GCD(true, s(x0), s(x1)) → GCD(minus(x0, x1), s(x1))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

(34) DependencyGraphProof (EQUIVALENT transformation)

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

(35) Obligation:

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

IF_GCD(true, s(x0), s(x1)) → GCD(minus(x0, x1), s(x1))
GCD(s(x0), s(0)) → IF_GCD(true, s(x0), s(0))
GCD(s(s(x1)), s(s(x0))) → IF_GCD(le(x0, x1), s(s(x1)), s(s(x0)))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

(36) Instantiation (EQUIVALENT transformation)

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

IF_GCD(true, s(z0), s(0)) → GCD(minus(z0, 0), s(0))
IF_GCD(true, s(s(z0)), s(s(z1))) → GCD(minus(s(z0), s(z1)), s(s(z1)))

(37) Obligation:

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

GCD(s(x0), s(0)) → IF_GCD(true, s(x0), s(0))
GCD(s(s(x1)), s(s(x0))) → IF_GCD(le(x0, x1), s(s(x1)), s(s(x0)))
IF_GCD(true, s(z0), s(0)) → GCD(minus(z0, 0), s(0))
IF_GCD(true, s(s(z0)), s(s(z1))) → GCD(minus(s(z0), s(z1)), s(s(z1)))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

(38) DependencyGraphProof (EQUIVALENT transformation)

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

(39) Complex Obligation (AND)

(40) Obligation:

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

IF_GCD(true, s(s(z0)), s(s(z1))) → GCD(minus(s(z0), s(z1)), s(s(z1)))
GCD(s(s(x1)), s(s(x0))) → IF_GCD(le(x0, x1), s(s(x1)), s(s(x0)))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

(41) Rewriting (EQUIVALENT transformation)

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

IF_GCD(true, s(s(z0)), s(s(z1))) → GCD(minus(z0, z1), s(s(z1)))

(42) Obligation:

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

GCD(s(s(x1)), s(s(x0))) → IF_GCD(le(x0, x1), s(s(x1)), s(s(x0)))
IF_GCD(true, s(s(z0)), s(s(z1))) → GCD(minus(z0, z1), s(s(z1)))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

(43) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF_GCD(true, s(s(z0)), s(s(z1))) → GCD(minus(z0, z1), s(s(z1)))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(GCD(x1, x2)) = 1 + x1   
POL(IF_GCD(x1, x2, x3)) = x1 + x2   
POL(false) = 0   
POL(le(x1, x2)) = 1   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = 1 + x1   
POL(true) = 1   

The following usable rules [FROCOS05] were oriented:

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

(44) Obligation:

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

GCD(s(s(x1)), s(s(x0))) → IF_GCD(le(x0, x1), s(s(x1)), s(s(x0)))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

(45) DependencyGraphProof (EQUIVALENT transformation)

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

(46) TRUE

(47) Obligation:

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

IF_GCD(true, s(z0), s(0)) → GCD(minus(z0, 0), s(0))
GCD(s(x0), s(0)) → IF_GCD(true, s(x0), s(0))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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

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

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

(49) Obligation:

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

IF_GCD(true, s(z0), s(0)) → GCD(minus(z0, 0), s(0))
GCD(s(x0), s(0)) → IF_GCD(true, s(x0), s(0))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, x) → 0

The set Q consists of the following terms:

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

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

(50) QReductionProof (EQUIVALENT transformation)

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

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

(51) Obligation:

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

IF_GCD(true, s(z0), s(0)) → GCD(minus(z0, 0), s(0))
GCD(s(x0), s(0)) → IF_GCD(true, s(x0), s(0))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, x) → 0

The set Q consists of the following terms:

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

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

(52) Rewriting (EQUIVALENT transformation)

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

IF_GCD(true, s(z0), s(0)) → GCD(z0, s(0))

(53) Obligation:

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

GCD(s(x0), s(0)) → IF_GCD(true, s(x0), s(0))
IF_GCD(true, s(z0), s(0)) → GCD(z0, s(0))

The TRS R consists of the following rules:

minus(x, 0) → x
minus(0, x) → 0

The set Q consists of the following terms:

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

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

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

(55) Obligation:

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

GCD(s(x0), s(0)) → IF_GCD(true, s(x0), s(0))
IF_GCD(true, s(z0), s(0)) → GCD(z0, s(0))

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

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

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

(56) QReductionProof (EQUIVALENT transformation)

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

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

(57) Obligation:

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

GCD(s(x0), s(0)) → IF_GCD(true, s(x0), s(0))
IF_GCD(true, s(z0), s(0)) → GCD(z0, s(0))

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

(58) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF_GCD(true, s(z0), s(0)) → GCD(z0, s(0)) we obtained the following new rules [LPAR04]:

IF_GCD(true, s(s(y_0)), s(0)) → GCD(s(y_0), s(0))

(59) Obligation:

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

GCD(s(x0), s(0)) → IF_GCD(true, s(x0), s(0))
IF_GCD(true, s(s(y_0)), s(0)) → GCD(s(y_0), s(0))

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

(60) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule GCD(s(x0), s(0)) → IF_GCD(true, s(x0), s(0)) we obtained the following new rules [LPAR04]:

GCD(s(s(y_0)), s(0)) → IF_GCD(true, s(s(y_0)), s(0))

(61) Obligation:

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

IF_GCD(true, s(s(y_0)), s(0)) → GCD(s(y_0), s(0))
GCD(s(s(y_0)), s(0)) → IF_GCD(true, s(s(y_0)), s(0))

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

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

  • GCD(s(s(y_0)), s(0)) → IF_GCD(true, s(s(y_0)), s(0))
    The graph contains the following edges 1 >= 2, 2 >= 3

  • IF_GCD(true, s(s(y_0)), s(0)) → GCD(s(y_0), s(0))
    The graph contains the following edges 2 > 1, 3 >= 2

(63) TRUE