(0) Obligation:

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

diff(x, y) → cond1(equal(x, y), x, y)
cond1(true, x, y) → 0
cond1(false, x, y) → cond2(gt(x, y), x, y)
cond2(true, x, y) → s(diff(x, s(y)))
cond2(false, x, y) → s(diff(s(x), y))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(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:

diff(x, y) → cond1(equal(x, y), x, y)
cond1(true, x, y) → 0
cond1(false, x, y) → cond2(gt(x, y), x, y)
cond2(true, x, y) → s(diff(x, s(y)))
cond2(false, x, y) → s(diff(s(x), y))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)

The set Q consists of the following terms:

diff(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(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:

DIFF(x, y) → COND1(equal(x, y), x, y)
DIFF(x, y) → EQUAL(x, y)
COND1(false, x, y) → COND2(gt(x, y), x, y)
COND1(false, x, y) → GT(x, y)
COND2(true, x, y) → DIFF(x, s(y))
COND2(false, x, y) → DIFF(s(x), y)
GT(s(u), s(v)) → GT(u, v)
EQUAL(s(x), s(y)) → EQUAL(x, y)

The TRS R consists of the following rules:

diff(x, y) → cond1(equal(x, y), x, y)
cond1(true, x, y) → 0
cond1(false, x, y) → cond2(gt(x, y), x, y)
cond2(true, x, y) → s(diff(x, s(y)))
cond2(false, x, y) → s(diff(s(x), y))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)

The set Q consists of the following terms:

diff(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(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 3 SCCs with 2 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

EQUAL(s(x), s(y)) → EQUAL(x, y)

The TRS R consists of the following rules:

diff(x, y) → cond1(equal(x, y), x, y)
cond1(true, x, y) → 0
cond1(false, x, y) → cond2(gt(x, y), x, y)
cond2(true, x, y) → s(diff(x, s(y)))
cond2(false, x, y) → s(diff(s(x), y))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)

The set Q consists of the following terms:

diff(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(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:

EQUAL(s(x), s(y)) → EQUAL(x, y)

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

diff(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(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].

diff(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))

(11) Obligation:

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

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

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

GT(s(u), s(v)) → GT(u, v)

The TRS R consists of the following rules:

diff(x, y) → cond1(equal(x, y), x, y)
cond1(true, x, y) → 0
cond1(false, x, y) → cond2(gt(x, y), x, y)
cond2(true, x, y) → s(diff(x, s(y)))
cond2(false, x, y) → s(diff(s(x), y))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)

The set Q consists of the following terms:

diff(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(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(u), s(v)) → GT(u, v)

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

diff(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(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].

diff(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))

(18) Obligation:

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

GT(s(u), s(v)) → GT(u, v)

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(u), s(v)) → GT(u, v)
    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:

COND1(false, x, y) → COND2(gt(x, y), x, y)
COND2(true, x, y) → DIFF(x, s(y))
DIFF(x, y) → COND1(equal(x, y), x, y)
COND2(false, x, y) → DIFF(s(x), y)

The TRS R consists of the following rules:

diff(x, y) → cond1(equal(x, y), x, y)
cond1(true, x, y) → 0
cond1(false, x, y) → cond2(gt(x, y), x, y)
cond2(true, x, y) → s(diff(x, s(y)))
cond2(false, x, y) → s(diff(s(x), y))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)

The set Q consists of the following terms:

diff(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(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:

COND1(false, x, y) → COND2(gt(x, y), x, y)
COND2(true, x, y) → DIFF(x, s(y))
DIFF(x, y) → COND1(equal(x, y), x, y)
COND2(false, x, y) → DIFF(s(x), y)

The TRS R consists of the following rules:

equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)

The set Q consists of the following terms:

diff(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(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].

diff(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)

(25) Obligation:

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

COND1(false, x, y) → COND2(gt(x, y), x, y)
COND2(true, x, y) → DIFF(x, s(y))
DIFF(x, y) → COND1(equal(x, y), x, y)
COND2(false, x, y) → DIFF(s(x), y)

The TRS R consists of the following rules:

equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)

The set Q consists of the following terms:

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

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

(26) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule DIFF(x, y) → COND1(equal(x, y), x, y) we obtained the following new rules [LPAR04]:

DIFF(z0, s(z1)) → COND1(equal(z0, s(z1)), z0, s(z1))
DIFF(s(z0), z1) → COND1(equal(s(z0), z1), s(z0), z1)

(27) Obligation:

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

COND1(false, x, y) → COND2(gt(x, y), x, y)
COND2(true, x, y) → DIFF(x, s(y))
COND2(false, x, y) → DIFF(s(x), y)
DIFF(z0, s(z1)) → COND1(equal(z0, s(z1)), z0, s(z1))
DIFF(s(z0), z1) → COND1(equal(s(z0), z1), s(z0), z1)

The TRS R consists of the following rules:

equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)

The set Q consists of the following terms:

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

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

(28) 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 COND1(false, x, y) → COND2(gt(x, y), x, y) the following chains were created:
  • We consider the chain COND2(true, x, y) → DIFF(x, s(y)), DIFF(x, y) → COND1(equal(x, y), x, y), COND1(false, x, y) → COND2(gt(x, y), x, y) which results in the following constraint:

    (1)    (DIFF(x22, s(x23))=DIFF(x24, x25)∧COND1(equal(x24, x25), x24, x25)=COND1(false, x26, x27) ⇒ COND1(false, x26, x27)≥COND2(gt(x26, x27), x26, x27))



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

    (2)    (s(x23)=x25equal(x24, x25)=falseCOND1(false, x24, x25)≥COND2(gt(x24, x25), x24, x25))



    We simplified constraint (2) using rule (V) (with possible (I) afterwards) using induction on equal(x24, x25)=false which results in the following new constraints:

    (3)    (false=falses(x23)=0COND1(false, s(x180), 0)≥COND2(gt(s(x180), 0), s(x180), 0))


    (4)    (false=falses(x23)=s(x181) ⇒ COND1(false, 0, s(x181))≥COND2(gt(0, s(x181)), 0, s(x181)))


    (5)    (equal(x183, x182)=falses(x23)=s(x182)∧(∀x184:equal(x183, x182)=falses(x184)=x182COND1(false, x183, x182)≥COND2(gt(x183, x182), x183, x182)) ⇒ COND1(false, s(x183), s(x182))≥COND2(gt(s(x183), s(x182)), s(x183), s(x182)))



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

    (6)    (COND1(false, 0, s(x23))≥COND2(gt(0, s(x23)), 0, s(x23)))



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

    (7)    (equal(x183, x182)=falseCOND1(false, s(x183), s(x182))≥COND2(gt(s(x183), s(x182)), s(x183), s(x182)))



    We simplified constraint (7) using rule (V) (with possible (I) afterwards) using induction on equal(x183, x182)=false which results in the following new constraints:

    (8)    (false=falseCOND1(false, s(s(x185)), s(0))≥COND2(gt(s(s(x185)), s(0)), s(s(x185)), s(0)))


    (9)    (false=falseCOND1(false, s(0), s(s(x186)))≥COND2(gt(s(0), s(s(x186))), s(0), s(s(x186))))


    (10)    (equal(x188, x187)=false∧(equal(x188, x187)=falseCOND1(false, s(x188), s(x187))≥COND2(gt(s(x188), s(x187)), s(x188), s(x187))) ⇒ COND1(false, s(s(x188)), s(s(x187)))≥COND2(gt(s(s(x188)), s(s(x187))), s(s(x188)), s(s(x187))))



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

    (11)    (COND1(false, s(s(x185)), s(0))≥COND2(gt(s(s(x185)), s(0)), s(s(x185)), s(0)))



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

    (12)    (COND1(false, s(0), s(s(x186)))≥COND2(gt(s(0), s(s(x186))), s(0), s(s(x186))))



    We simplified constraint (10) using rule (VI) where we applied the induction hypothesis (equal(x188, x187)=falseCOND1(false, s(x188), s(x187))≥COND2(gt(s(x188), s(x187)), s(x188), s(x187))) with σ = [ ] which results in the following new constraint:

    (13)    (COND1(false, s(x188), s(x187))≥COND2(gt(s(x188), s(x187)), s(x188), s(x187)) ⇒ COND1(false, s(s(x188)), s(s(x187)))≥COND2(gt(s(s(x188)), s(s(x187))), s(s(x188)), s(s(x187))))



  • We consider the chain COND2(false, x, y) → DIFF(s(x), y), DIFF(x, y) → COND1(equal(x, y), x, y), COND1(false, x, y) → COND2(gt(x, y), x, y) which results in the following constraint:

    (14)    (DIFF(s(x30), x31)=DIFF(x32, x33)∧COND1(equal(x32, x33), x32, x33)=COND1(false, x34, x35) ⇒ COND1(false, x34, x35)≥COND2(gt(x34, x35), x34, x35))



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

    (15)    (s(x30)=x32equal(x32, x33)=falseCOND1(false, x32, x33)≥COND2(gt(x32, x33), x32, x33))



    We simplified constraint (15) using rule (V) (with possible (I) afterwards) using induction on equal(x32, x33)=false which results in the following new constraints:

    (16)    (false=falses(x30)=s(x189) ⇒ COND1(false, s(x189), 0)≥COND2(gt(s(x189), 0), s(x189), 0))


    (17)    (false=falses(x30)=0COND1(false, 0, s(x190))≥COND2(gt(0, s(x190)), 0, s(x190)))


    (18)    (equal(x192, x191)=falses(x30)=s(x192)∧(∀x193:equal(x192, x191)=falses(x193)=x192COND1(false, x192, x191)≥COND2(gt(x192, x191), x192, x191)) ⇒ COND1(false, s(x192), s(x191))≥COND2(gt(s(x192), s(x191)), s(x192), s(x191)))



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

    (19)    (COND1(false, s(x30), 0)≥COND2(gt(s(x30), 0), s(x30), 0))



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

    (20)    (equal(x192, x191)=falseCOND1(false, s(x192), s(x191))≥COND2(gt(s(x192), s(x191)), s(x192), s(x191)))



    We simplified constraint (20) using rule (V) (with possible (I) afterwards) using induction on equal(x192, x191)=false which results in the following new constraints:

    (21)    (false=falseCOND1(false, s(s(x194)), s(0))≥COND2(gt(s(s(x194)), s(0)), s(s(x194)), s(0)))


    (22)    (false=falseCOND1(false, s(0), s(s(x195)))≥COND2(gt(s(0), s(s(x195))), s(0), s(s(x195))))


    (23)    (equal(x197, x196)=false∧(equal(x197, x196)=falseCOND1(false, s(x197), s(x196))≥COND2(gt(s(x197), s(x196)), s(x197), s(x196))) ⇒ COND1(false, s(s(x197)), s(s(x196)))≥COND2(gt(s(s(x197)), s(s(x196))), s(s(x197)), s(s(x196))))



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

    (24)    (COND1(false, s(s(x194)), s(0))≥COND2(gt(s(s(x194)), s(0)), s(s(x194)), s(0)))



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

    (25)    (COND1(false, s(0), s(s(x195)))≥COND2(gt(s(0), s(s(x195))), s(0), s(s(x195))))



    We simplified constraint (23) using rule (VI) where we applied the induction hypothesis (equal(x197, x196)=falseCOND1(false, s(x197), s(x196))≥COND2(gt(s(x197), s(x196)), s(x197), s(x196))) with σ = [ ] which results in the following new constraint:

    (26)    (COND1(false, s(x197), s(x196))≥COND2(gt(s(x197), s(x196)), s(x197), s(x196)) ⇒ COND1(false, s(s(x197)), s(s(x196)))≥COND2(gt(s(s(x197)), s(s(x196))), s(s(x197)), s(s(x196))))







For Pair COND2(true, x, y) → DIFF(x, s(y)) the following chains were created:
  • We consider the chain DIFF(x, y) → COND1(equal(x, y), x, y), COND1(false, x, y) → COND2(gt(x, y), x, y), COND2(true, x, y) → DIFF(x, s(y)) which results in the following constraint:

    (27)    (COND1(equal(x50, x51), x50, x51)=COND1(false, x52, x53)∧COND2(gt(x52, x53), x52, x53)=COND2(true, x54, x55) ⇒ COND2(true, x54, x55)≥DIFF(x54, s(x55)))



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

    (28)    (equal(x50, x51)=falsex50=x52x51=x53gt(x52, x53)=trueCOND2(true, x52, x53)≥DIFF(x52, s(x53)))



    We simplified constraint (28) using rule (V) (with possible (I) afterwards) using induction on equal(x50, x51)=false which results in the following new constraints:

    (29)    (false=falses(x198)=x520=x53gt(x52, x53)=trueCOND2(true, x52, x53)≥DIFF(x52, s(x53)))


    (30)    (false=false0=x52s(x199)=x53gt(x52, x53)=trueCOND2(true, x52, x53)≥DIFF(x52, s(x53)))


    (31)    (equal(x201, x200)=falses(x201)=x52s(x200)=x53gt(x52, x53)=true∧(∀x202,x203:equal(x201, x200)=falsex201=x202x200=x203gt(x202, x203)=trueCOND2(true, x202, x203)≥DIFF(x202, s(x203))) ⇒ COND2(true, x52, x53)≥DIFF(x52, s(x53)))



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

    (32)    (s(x198)=x520=x53gt(x52, x53)=trueCOND2(true, x52, x53)≥DIFF(x52, s(x53)))



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

    (33)    (0=x52s(x199)=x53gt(x52, x53)=trueCOND2(true, x52, x53)≥DIFF(x52, s(x53)))



    We simplified constraint (31) using rule (V) (with possible (I) afterwards) using induction on gt(x52, x53)=true which results in the following new constraints:

    (34)    (true=trueequal(x201, x200)=falses(x201)=s(x215)∧s(x200)=0∧(∀x202,x203:equal(x201, x200)=falsex201=x202x200=x203gt(x202, x203)=trueCOND2(true, x202, x203)≥DIFF(x202, s(x203))) ⇒ COND2(true, s(x215), 0)≥DIFF(s(x215), s(0)))


    (35)    (gt(x217, x216)=trueequal(x201, x200)=falses(x201)=s(x217)∧s(x200)=s(x216)∧(∀x202,x203:equal(x201, x200)=falsex201=x202x200=x203gt(x202, x203)=trueCOND2(true, x202, x203)≥DIFF(x202, s(x203)))∧(∀x218,x219,x220,x221:gt(x217, x216)=trueequal(x218, x219)=falses(x218)=x217s(x219)=x216∧(∀x220,x221:equal(x218, x219)=falsex218=x220x219=x221gt(x220, x221)=trueCOND2(true, x220, x221)≥DIFF(x220, s(x221))) ⇒ COND2(true, x217, x216)≥DIFF(x217, s(x216))) ⇒ COND2(true, s(x217), s(x216))≥DIFF(s(x217), s(s(x216))))



    We simplified constraint (32) using rule (V) (with possible (I) afterwards) using induction on gt(x52, x53)=true which results in the following new constraints:

    (36)    (true=trues(x198)=s(x205)∧0=0COND2(true, s(x205), 0)≥DIFF(s(x205), s(0)))


    (37)    (gt(x207, x206)=trues(x198)=s(x207)∧0=s(x206)∧(∀x208:gt(x207, x206)=trues(x208)=x2070=x206COND2(true, x207, x206)≥DIFF(x207, s(x206))) ⇒ COND2(true, s(x207), s(x206))≥DIFF(s(x207), s(s(x206))))



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

    (38)    (COND2(true, s(x198), 0)≥DIFF(s(x198), s(0)))



    We solved constraint (37) using rules (I), (II).We simplified constraint (33) using rule (V) (with possible (I) afterwards) using induction on gt(x52, x53)=true which results in the following new constraints:

    (39)    (true=true0=s(x210)∧s(x199)=0COND2(true, s(x210), 0)≥DIFF(s(x210), s(0)))


    (40)    (gt(x212, x211)=true0=s(x212)∧s(x199)=s(x211)∧(∀x213:gt(x212, x211)=true0=x212s(x213)=x211COND2(true, x212, x211)≥DIFF(x212, s(x211))) ⇒ COND2(true, s(x212), s(x211))≥DIFF(s(x212), s(s(x211))))



    We solved constraint (39) using rules (I), (II).We solved constraint (40) using rules (I), (II).We solved constraint (34) using rules (I), (II).We simplified constraint (35) using rules (I), (II) which results in the following new constraint:

    (41)    (gt(x217, x216)=trueequal(x201, x200)=falsex201=x217x200=x216∧(∀x202,x203:equal(x201, x200)=falsex201=x202x200=x203gt(x202, x203)=trueCOND2(true, x202, x203)≥DIFF(x202, s(x203)))∧(∀x218,x219,x220,x221:gt(x217, x216)=trueequal(x218, x219)=falses(x218)=x217s(x219)=x216∧(∀x220,x221:equal(x218, x219)=falsex218=x220x219=x221gt(x220, x221)=trueCOND2(true, x220, x221)≥DIFF(x220, s(x221))) ⇒ COND2(true, x217, x216)≥DIFF(x217, s(x216))) ⇒ COND2(true, s(x217), s(x216))≥DIFF(s(x217), s(s(x216))))



    We simplified constraint (41) using rule (VI) where we applied the induction hypothesis (∀x202,x203:equal(x201, x200)=falsex201=x202x200=x203gt(x202, x203)=trueCOND2(true, x202, x203)≥DIFF(x202, s(x203))) with σ = [x202 / x217, x203 / x216] which results in the following new constraint:

    (42)    (COND2(true, x217, x216)≥DIFF(x217, s(x216))∧(∀x218,x219,x220,x221:gt(x217, x216)=trueequal(x218, x219)=falses(x218)=x217s(x219)=x216∧(∀x220,x221:equal(x218, x219)=falsex218=x220x219=x221gt(x220, x221)=trueCOND2(true, x220, x221)≥DIFF(x220, s(x221))) ⇒ COND2(true, x217, x216)≥DIFF(x217, s(x216))) ⇒ COND2(true, s(x217), s(x216))≥DIFF(s(x217), s(s(x216))))



    We simplified constraint (42) using rule (IV) which results in the following new constraint:

    (43)    (COND2(true, x217, x216)≥DIFF(x217, s(x216)) ⇒ COND2(true, s(x217), s(x216))≥DIFF(s(x217), s(s(x216))))







For Pair DIFF(x, y) → COND1(equal(x, y), x, y) the following chains were created:
  • We consider the chain COND1(false, x, y) → COND2(gt(x, y), x, y), COND2(true, x, y) → DIFF(x, s(y)), DIFF(x, y) → COND1(equal(x, y), x, y) which results in the following constraint:

    (44)    (COND2(gt(x100, x101), x100, x101)=COND2(true, x102, x103)∧DIFF(x102, s(x103))=DIFF(x104, x105) ⇒ DIFF(x104, x105)≥COND1(equal(x104, x105), x104, x105))



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

    (45)    (gt(x100, x101)=trueDIFF(x100, s(x101))≥COND1(equal(x100, s(x101)), x100, s(x101)))



    We simplified constraint (45) using rule (V) (with possible (I) afterwards) using induction on gt(x100, x101)=true which results in the following new constraints:

    (46)    (true=trueDIFF(s(x223), s(0))≥COND1(equal(s(x223), s(0)), s(x223), s(0)))


    (47)    (gt(x225, x224)=true∧(gt(x225, x224)=trueDIFF(x225, s(x224))≥COND1(equal(x225, s(x224)), x225, s(x224))) ⇒ DIFF(s(x225), s(s(x224)))≥COND1(equal(s(x225), s(s(x224))), s(x225), s(s(x224))))



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

    (48)    (DIFF(s(x223), s(0))≥COND1(equal(s(x223), s(0)), s(x223), s(0)))



    We simplified constraint (47) using rule (VI) where we applied the induction hypothesis (gt(x225, x224)=trueDIFF(x225, s(x224))≥COND1(equal(x225, s(x224)), x225, s(x224))) with σ = [ ] which results in the following new constraint:

    (49)    (DIFF(x225, s(x224))≥COND1(equal(x225, s(x224)), x225, s(x224)) ⇒ DIFF(s(x225), s(s(x224)))≥COND1(equal(s(x225), s(s(x224))), s(x225), s(s(x224))))



  • We consider the chain COND1(false, x, y) → COND2(gt(x, y), x, y), COND2(false, x, y) → DIFF(s(x), y), DIFF(x, y) → COND1(equal(x, y), x, y) which results in the following constraint:

    (50)    (COND2(gt(x124, x125), x124, x125)=COND2(false, x126, x127)∧DIFF(s(x126), x127)=DIFF(x128, x129) ⇒ DIFF(x128, x129)≥COND1(equal(x128, x129), x128, x129))



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

    (51)    (gt(x124, x125)=falseDIFF(s(x124), x125)≥COND1(equal(s(x124), x125), s(x124), x125))



    We simplified constraint (51) using rule (V) (with possible (I) afterwards) using induction on gt(x124, x125)=false which results in the following new constraints:

    (52)    (false=falseDIFF(s(0), x226)≥COND1(equal(s(0), x226), s(0), x226))


    (53)    (gt(x229, x228)=false∧(gt(x229, x228)=falseDIFF(s(x229), x228)≥COND1(equal(s(x229), x228), s(x229), x228)) ⇒ DIFF(s(s(x229)), s(x228))≥COND1(equal(s(s(x229)), s(x228)), s(s(x229)), s(x228)))



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

    (54)    (DIFF(s(0), x226)≥COND1(equal(s(0), x226), s(0), x226))



    We simplified constraint (53) using rule (VI) where we applied the induction hypothesis (gt(x229, x228)=falseDIFF(s(x229), x228)≥COND1(equal(s(x229), x228), s(x229), x228)) with σ = [ ] which results in the following new constraint:

    (55)    (DIFF(s(x229), x228)≥COND1(equal(s(x229), x228), s(x229), x228) ⇒ DIFF(s(s(x229)), s(x228))≥COND1(equal(s(s(x229)), s(x228)), s(s(x229)), s(x228)))







For Pair COND2(false, x, y) → DIFF(s(x), y) the following chains were created:
  • We consider the chain DIFF(x, y) → COND1(equal(x, y), x, y), COND1(false, x, y) → COND2(gt(x, y), x, y), COND2(false, x, y) → DIFF(s(x), y) which results in the following constraint:

    (56)    (COND1(equal(x140, x141), x140, x141)=COND1(false, x142, x143)∧COND2(gt(x142, x143), x142, x143)=COND2(false, x144, x145) ⇒ COND2(false, x144, x145)≥DIFF(s(x144), x145))



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

    (57)    (equal(x140, x141)=falsex140=x142x141=x143gt(x142, x143)=falseCOND2(false, x142, x143)≥DIFF(s(x142), x143))



    We simplified constraint (57) using rule (V) (with possible (I) afterwards) using induction on equal(x140, x141)=false which results in the following new constraints:

    (58)    (false=falses(x230)=x1420=x143gt(x142, x143)=falseCOND2(false, x142, x143)≥DIFF(s(x142), x143))


    (59)    (false=false0=x142s(x231)=x143gt(x142, x143)=falseCOND2(false, x142, x143)≥DIFF(s(x142), x143))


    (60)    (equal(x233, x232)=falses(x233)=x142s(x232)=x143gt(x142, x143)=false∧(∀x234,x235:equal(x233, x232)=falsex233=x234x232=x235gt(x234, x235)=falseCOND2(false, x234, x235)≥DIFF(s(x234), x235)) ⇒ COND2(false, x142, x143)≥DIFF(s(x142), x143))



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

    (61)    (s(x230)=x1420=x143gt(x142, x143)=falseCOND2(false, x142, x143)≥DIFF(s(x142), x143))



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

    (62)    (0=x142s(x231)=x143gt(x142, x143)=falseCOND2(false, x142, x143)≥DIFF(s(x142), x143))



    We simplified constraint (60) using rule (V) (with possible (I) afterwards) using induction on gt(x142, x143)=false which results in the following new constraints:

    (63)    (false=falseequal(x233, x232)=falses(x233)=0s(x232)=x246∧(∀x234,x235:equal(x233, x232)=falsex233=x234x232=x235gt(x234, x235)=falseCOND2(false, x234, x235)≥DIFF(s(x234), x235)) ⇒ COND2(false, 0, x246)≥DIFF(s(0), x246))


    (64)    (gt(x249, x248)=falseequal(x233, x232)=falses(x233)=s(x249)∧s(x232)=s(x248)∧(∀x234,x235:equal(x233, x232)=falsex233=x234x232=x235gt(x234, x235)=falseCOND2(false, x234, x235)≥DIFF(s(x234), x235))∧(∀x250,x251,x252,x253:gt(x249, x248)=falseequal(x250, x251)=falses(x250)=x249s(x251)=x248∧(∀x252,x253:equal(x250, x251)=falsex250=x252x251=x253gt(x252, x253)=falseCOND2(false, x252, x253)≥DIFF(s(x252), x253)) ⇒ COND2(false, x249, x248)≥DIFF(s(x249), x248)) ⇒ COND2(false, s(x249), s(x248))≥DIFF(s(s(x249)), s(x248)))



    We simplified constraint (61) using rule (V) (with possible (I) afterwards) using induction on gt(x142, x143)=false which results in the following new constraints:

    (65)    (false=falses(x230)=00=x236COND2(false, 0, x236)≥DIFF(s(0), x236))


    (66)    (gt(x239, x238)=falses(x230)=s(x239)∧0=s(x238)∧(∀x240:gt(x239, x238)=falses(x240)=x2390=x238COND2(false, x239, x238)≥DIFF(s(x239), x238)) ⇒ COND2(false, s(x239), s(x238))≥DIFF(s(s(x239)), s(x238)))



    We solved constraint (65) using rules (I), (II).We solved constraint (66) using rules (I), (II).We simplified constraint (62) using rule (V) (with possible (I) afterwards) using induction on gt(x142, x143)=false which results in the following new constraints:

    (67)    (false=false0=0s(x231)=x241COND2(false, 0, x241)≥DIFF(s(0), x241))


    (68)    (gt(x244, x243)=false0=s(x244)∧s(x231)=s(x243)∧(∀x245:gt(x244, x243)=false0=x244s(x245)=x243COND2(false, x244, x243)≥DIFF(s(x244), x243)) ⇒ COND2(false, s(x244), s(x243))≥DIFF(s(s(x244)), s(x243)))



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

    (69)    (COND2(false, 0, s(x231))≥DIFF(s(0), s(x231)))



    We solved constraint (68) using rules (I), (II).We solved constraint (63) using rules (I), (II).We simplified constraint (64) using rules (I), (II) which results in the following new constraint:

    (70)    (gt(x249, x248)=falseequal(x233, x232)=falsex233=x249x232=x248∧(∀x234,x235:equal(x233, x232)=falsex233=x234x232=x235gt(x234, x235)=falseCOND2(false, x234, x235)≥DIFF(s(x234), x235))∧(∀x250,x251,x252,x253:gt(x249, x248)=falseequal(x250, x251)=falses(x250)=x249s(x251)=x248∧(∀x252,x253:equal(x250, x251)=falsex250=x252x251=x253gt(x252, x253)=falseCOND2(false, x252, x253)≥DIFF(s(x252), x253)) ⇒ COND2(false, x249, x248)≥DIFF(s(x249), x248)) ⇒ COND2(false, s(x249), s(x248))≥DIFF(s(s(x249)), s(x248)))



    We simplified constraint (70) using rule (VI) where we applied the induction hypothesis (∀x234,x235:equal(x233, x232)=falsex233=x234x232=x235gt(x234, x235)=falseCOND2(false, x234, x235)≥DIFF(s(x234), x235)) with σ = [x234 / x249, x235 / x248] which results in the following new constraint:

    (71)    (COND2(false, x249, x248)≥DIFF(s(x249), x248)∧(∀x250,x251,x252,x253:gt(x249, x248)=falseequal(x250, x251)=falses(x250)=x249s(x251)=x248∧(∀x252,x253:equal(x250, x251)=falsex250=x252x251=x253gt(x252, x253)=falseCOND2(false, x252, x253)≥DIFF(s(x252), x253)) ⇒ COND2(false, x249, x248)≥DIFF(s(x249), x248)) ⇒ COND2(false, s(x249), s(x248))≥DIFF(s(s(x249)), s(x248)))



    We simplified constraint (71) using rule (IV) which results in the following new constraint:

    (72)    (COND2(false, x249, x248)≥DIFF(s(x249), x248) ⇒ COND2(false, s(x249), s(x248))≥DIFF(s(s(x249)), s(x248)))







To summarize, we get the following constraints P for the following pairs.
  • COND1(false, x, y) → COND2(gt(x, y), x, y)
    • (COND1(false, 0, s(x23))≥COND2(gt(0, s(x23)), 0, s(x23)))
    • (COND1(false, s(s(x185)), s(0))≥COND2(gt(s(s(x185)), s(0)), s(s(x185)), s(0)))
    • (COND1(false, s(0), s(s(x186)))≥COND2(gt(s(0), s(s(x186))), s(0), s(s(x186))))
    • (COND1(false, s(x188), s(x187))≥COND2(gt(s(x188), s(x187)), s(x188), s(x187)) ⇒ COND1(false, s(s(x188)), s(s(x187)))≥COND2(gt(s(s(x188)), s(s(x187))), s(s(x188)), s(s(x187))))
    • (COND1(false, s(x30), 0)≥COND2(gt(s(x30), 0), s(x30), 0))
    • (COND1(false, s(s(x194)), s(0))≥COND2(gt(s(s(x194)), s(0)), s(s(x194)), s(0)))
    • (COND1(false, s(0), s(s(x195)))≥COND2(gt(s(0), s(s(x195))), s(0), s(s(x195))))
    • (COND1(false, s(x197), s(x196))≥COND2(gt(s(x197), s(x196)), s(x197), s(x196)) ⇒ COND1(false, s(s(x197)), s(s(x196)))≥COND2(gt(s(s(x197)), s(s(x196))), s(s(x197)), s(s(x196))))

  • COND2(true, x, y) → DIFF(x, s(y))
    • (COND2(true, s(x198), 0)≥DIFF(s(x198), s(0)))
    • (COND2(true, x217, x216)≥DIFF(x217, s(x216)) ⇒ COND2(true, s(x217), s(x216))≥DIFF(s(x217), s(s(x216))))

  • DIFF(x, y) → COND1(equal(x, y), x, y)
    • (DIFF(s(x223), s(0))≥COND1(equal(s(x223), s(0)), s(x223), s(0)))
    • (DIFF(x225, s(x224))≥COND1(equal(x225, s(x224)), x225, s(x224)) ⇒ DIFF(s(x225), s(s(x224)))≥COND1(equal(s(x225), s(s(x224))), s(x225), s(s(x224))))
    • (DIFF(s(0), x226)≥COND1(equal(s(0), x226), s(0), x226))
    • (DIFF(s(x229), x228)≥COND1(equal(s(x229), x228), s(x229), x228) ⇒ DIFF(s(s(x229)), s(x228))≥COND1(equal(s(s(x229)), s(x228)), s(s(x229)), s(x228)))

  • COND2(false, x, y) → DIFF(s(x), y)
    • (COND2(false, 0, s(x231))≥DIFF(s(0), s(x231)))
    • (COND2(false, x249, x248)≥DIFF(s(x249), x248) ⇒ COND2(false, s(x249), s(x248))≥DIFF(s(s(x249)), s(x248)))




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(COND1(x1, x2, x3)) = -1 + 2·x1·x2 - 2·x1·x3 + x12 - 2·x2·x3 + x22 + x32   
POL(COND2(x1, x2, x3)) = -1 + 2·x1·x2 - 2·x1·x3 + x12 - 2·x2·x3 + x22 + x32   
POL(DIFF(x1, x2)) = -1 - 2·x1·x2 + x12 + x22   
POL(c) = -1   
POL(equal(x1, x2)) = 0   
POL(false) = 0   
POL(gt(x1, x2)) = 0   
POL(s(x1)) = 1 + x1   
POL(true) = 0   

The following pairs are in P>:

COND2(true, x, y) → DIFF(x, s(y))
COND2(false, x, y) → DIFF(s(x), y)
The following pairs are in Pbound:

COND1(false, x, y) → COND2(gt(x, y), x, y)
COND2(true, x, y) → DIFF(x, s(y))
DIFF(x, y) → COND1(equal(x, y), x, y)
COND2(false, x, y) → DIFF(s(x), y)
The following rules are usable:

equal(0, 0) ↔ true
gt(s(u), s(v)) ↔ gt(u, v)
gt(s(u), 0) ↔ true
gt(0, v) ↔ false
equal(s(x), s(y)) ↔ equal(x, y)
equal(0, s(y)) ↔ false
equal(s(x), 0) ↔ false

(29) Obligation:

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

COND1(false, x, y) → COND2(gt(x, y), x, y)
DIFF(x, y) → COND1(equal(x, y), x, y)

The TRS R consists of the following rules:

equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)

The set Q consists of the following terms:

gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(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 0 SCCs with 2 less nodes.

(31) TRUE