0 QTRS
↳1 Overlay + Local Confluence (⇔)
↳2 QTRS
↳3 DependencyPairsProof (⇔)
↳4 QDP
↳5 DependencyGraphProof (⇔)
↳6 AND
↳7 QDP
↳8 UsableRulesProof (⇔)
↳9 QDP
↳10 QReductionProof (⇔)
↳11 QDP
↳12 QDPSizeChangeProof (⇔)
↳13 YES
↳14 QDP
↳15 UsableRulesProof (⇔)
↳16 QDP
↳17 QReductionProof (⇔)
↳18 QDP
↳19 QDPSizeChangeProof (⇔)
↳20 YES
↳21 QDP
↳22 UsableRulesProof (⇔)
↳23 QDP
↳24 QReductionProof (⇔)
↳25 QDP
↳26 QDPOrderProof (⇔)
↳27 QDP
↳28 PisEmptyProof (⇔)
↳29 YES
↳30 QDP
↳31 UsableRulesProof (⇔)
↳32 QDP
↳33 QReductionProof (⇔)
↳34 QDP
↳35 Rewriting (⇔)
↳36 QDP
↳37 Narrowing (⇔)
↳38 QDP
↳39 DependencyGraphProof (⇔)
↳40 QDP
↳41 Narrowing (⇔)
↳42 QDP
↳43 DependencyGraphProof (⇔)
↳44 QDP
↳45 Narrowing (⇔)
↳46 QDP
↳47 DependencyGraphProof (⇔)
↳48 QDP
↳49 Instantiation (⇔)
↳50 QDP
↳51 MNOCProof (⇔)
↳52 QDP
↳53 MNOCProof (⇔)
↳54 QDP
minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0
minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
MINUS(x, y) → IF(gt(x, y), x, y)
MINUS(x, y) → GT(x, y)
IF(true, x, y) → MINUS(p(x), y)
IF(true, x, y) → P(x)
GE(s(x), s(y)) → GE(x, y)
GT(s(x), s(y)) → GT(x, y)
DIV(x, y) → IF1(ge(x, y), x, y)
DIV(x, y) → GE(x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)
IF1(true, x, y) → GT(y, 0)
IF2(true, x, y) → DIV(minus(x, y), y)
IF2(true, x, y) → MINUS(x, y)
minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
GT(s(x), s(y)) → GT(x, y)
minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
GT(s(x), s(y)) → GT(x, y)
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
GT(s(x), s(y)) → GT(x, y)
From the DPs we obtained the following set of size-change graphs:
GE(s(x), s(y)) → GE(x, y)
minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
GE(s(x), s(y)) → GE(x, y)
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
GE(s(x), s(y)) → GE(x, y)
From the DPs we obtained the following set of size-change graphs:
IF(true, x, y) → MINUS(p(x), y)
MINUS(x, y) → IF(gt(x, y), x, y)
minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
IF(true, x, y) → MINUS(p(x), y)
MINUS(x, y) → IF(gt(x, y), x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
p(0) → 0
p(s(x)) → x
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
IF(true, x, y) → MINUS(p(x), y)
MINUS(x, y) → IF(gt(x, y), x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
p(0) → 0
p(s(x)) → x
p(0)
p(s(x0))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
IF(true, x, y) → MINUS(p(x), y)
MINUS(x, y) → IF(gt(x, y), x, y)
The value of delta used in the strict ordering is 3/4.
POL(0) = 0
POL(IF(x1, x2, x3)) = [1/4] + x1 + x2
POL(MINUS(x1, x2)) = [2] + [2]x1
POL(false) = [1/4]
POL(gt(x1, x2)) = [1] + x1
POL(p(x1)) = [1/4]x1
POL(s(x1)) = [4] + [4]x1
POL(true) = [4]
p(0) → 0
p(s(x)) → x
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
p(0) → 0
p(s(x)) → x
p(0)
p(s(x0))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
IF2(true, x, y) → DIV(minus(x, y), y)
DIV(x, y) → IF1(ge(x, y), x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)
minus(x, y) → if(gt(x, y), x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
div(x, y) → if1(ge(x, y), x, y)
if1(true, x, y) → if2(gt(y, 0), x, y)
if1(false, x, y) → 0
if2(true, x, y) → s(div(minus(x, y), y))
if2(false, x, y) → 0
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
IF2(true, x, y) → DIV(minus(x, y), y)
DIV(x, y) → IF1(ge(x, y), x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)
gt(0, y) → false
gt(s(x), 0) → true
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
div(x0, x1)
if1(true, x0, x1)
if1(false, x0, x1)
if2(true, x0, x1)
if2(false, x0, x1)
IF2(true, x, y) → DIV(minus(x, y), y)
DIV(x, y) → IF1(ge(x, y), x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)
gt(0, y) → false
gt(s(x), 0) → true
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
IF2(true, x, y) → DIV(if(gt(x, y), x, y), y)
DIV(x, y) → IF1(ge(x, y), x, y)
IF1(true, x, y) → IF2(gt(y, 0), x, y)
IF2(true, x, y) → DIV(if(gt(x, y), x, y), y)
gt(0, y) → false
gt(s(x), 0) → true
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
DIV(x0, 0) → IF1(true, x0, 0)
DIV(0, s(x0)) → IF1(false, 0, s(x0))
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, x, y) → IF2(gt(y, 0), x, y)
IF2(true, x, y) → DIV(if(gt(x, y), x, y), y)
DIV(x0, 0) → IF1(true, x0, 0)
DIV(0, s(x0)) → IF1(false, 0, s(x0))
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
gt(0, y) → false
gt(s(x), 0) → true
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
IF2(true, x, y) → DIV(if(gt(x, y), x, y), y)
DIV(x0, 0) → IF1(true, x0, 0)
IF1(true, x, y) → IF2(gt(y, 0), x, y)
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
gt(0, y) → false
gt(s(x), 0) → true
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
IF1(true, y0, 0) → IF2(false, y0, 0)
IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF2(true, x, y) → DIV(if(gt(x, y), x, y), y)
DIV(x0, 0) → IF1(true, x0, 0)
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, y0, 0) → IF2(false, y0, 0)
IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
gt(0, y) → false
gt(s(x), 0) → true
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
DIV(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) → DIV(if(gt(x, y), x, y), y)
gt(0, y) → false
gt(s(x), 0) → true
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
IF2(true, 0, x0) → DIV(if(false, 0, x0), x0)
IF2(true, s(x0), 0) → DIV(if(true, s(x0), 0), 0)
IF2(true, s(x0), s(x1)) → DIV(if(gt(x0, x1), s(x0), s(x1)), s(x1))
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF2(true, 0, x0) → DIV(if(false, 0, x0), x0)
IF2(true, s(x0), 0) → DIV(if(true, s(x0), 0), 0)
IF2(true, s(x0), s(x1)) → DIV(if(gt(x0, x1), s(x0), s(x1)), s(x1))
gt(0, y) → false
gt(s(x), 0) → true
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
IF1(true, y0, s(x0)) → IF2(true, y0, s(x0))
IF2(true, s(x0), s(x1)) → DIV(if(gt(x0, x1), s(x0), s(x1)), s(x1))
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
gt(0, y) → false
gt(s(x), 0) → true
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))
IF2(true, s(x0), s(x1)) → DIV(if(gt(x0, x1), s(x0), s(x1)), s(x1))
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))
gt(0, y) → false
gt(s(x), 0) → true
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
minus(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
p(0)
p(s(x0))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
IF2(true, s(x0), s(x1)) → DIV(if(gt(x0, x1), s(x0), s(x1)), s(x1))
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))
gt(0, y) → false
gt(s(x), 0) → true
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x
IF2(true, s(x0), s(x1)) → DIV(if(gt(x0, x1), s(x0), s(x1)), s(x1))
DIV(s(x0), s(x1)) → IF1(ge(x0, x1), s(x0), s(x1))
IF1(true, s(z0), s(z1)) → IF2(true, s(z0), s(z1))
gt(0, y) → false
gt(s(x), 0) → true
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
minus(x, y) → if(gt(x, y), x, y)
gt(s(x), s(y)) → gt(x, y)
if(true, x, y) → s(minus(p(x), y))
if(false, x, y) → 0
p(0) → 0
p(s(x)) → x