R
↳Dependency Pair Analysis
GE(s(x), s(y)) -> GE(x, y)
MINUS(s(x), s(y)) -> MINUS(x, y)
DIV(x, y) -> IFY(ge(y, s(0)), x, y)
DIV(x, y) -> GE(y, s(0))
IFY(true, x, y) -> IF(ge(x, y), x, y)
IFY(true, x, y) -> GE(x, y)
IF(true, x, y) -> DIV(minus(x, y), y)
IF(true, x, y) -> MINUS(x, y)
R
↳DPs
→DP Problem 1
↳Argument Filtering and Ordering
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
GE(s(x), s(y)) -> GE(x, y)
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
GE(s(x), s(y)) -> GE(x, y)
GE(x1, x2) -> GE(x1, x2)
s(x1) -> s(x1)
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 4
↳Dependency Graph
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳Argument Filtering and Ordering
→DP Problem 3
↳Nar
MINUS(s(x), s(y)) -> MINUS(x, y)
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
MINUS(s(x), s(y)) -> MINUS(x, y)
MINUS(x1, x2) -> MINUS(x1, x2)
s(x1) -> s(x1)
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 5
↳Dependency Graph
→DP Problem 3
↳Nar
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Narrowing Transformation
IF(true, x, y) -> DIV(minus(x, y), y)
IFY(true, x, y) -> IF(ge(x, y), x, y)
DIV(x, y) -> IFY(ge(y, s(0)), x, y)
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
two new Dependency Pairs are created:
DIV(x, y) -> IFY(ge(y, s(0)), x, y)
DIV(x, 0) -> IFY(false, x, 0)
DIV(x, s(x'')) -> IFY(ge(x'', 0), x, s(x''))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rewriting Transformation
IFY(true, x, y) -> IF(ge(x, y), x, y)
DIV(x, s(x'')) -> IFY(ge(x'', 0), x, s(x''))
IF(true, x, y) -> DIV(minus(x, y), y)
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
one new Dependency Pair is created:
DIV(x, s(x'')) -> IFY(ge(x'', 0), x, s(x''))
DIV(x, s(x'')) -> IFY(true, x, s(x''))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 7
↳Narrowing Transformation
DIV(x, s(x'')) -> IFY(true, x, s(x''))
IF(true, x, y) -> DIV(minus(x, y), y)
IFY(true, x, y) -> IF(ge(x, y), x, y)
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
three new Dependency Pairs are created:
IFY(true, x, y) -> IF(ge(x, y), x, y)
IFY(true, x'', 0) -> IF(true, x'', 0)
IFY(true, 0, s(x'')) -> IF(false, 0, s(x''))
IFY(true, s(x''), s(y'')) -> IF(ge(x'', y''), s(x''), s(y''))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 8
↳Instantiation Transformation
IF(true, x, y) -> DIV(minus(x, y), y)
IFY(true, s(x''), s(y'')) -> IF(ge(x'', y''), s(x''), s(y''))
DIV(x, s(x'')) -> IFY(true, x, s(x''))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
one new Dependency Pair is created:
IF(true, x, y) -> DIV(minus(x, y), y)
IF(true, s(x'''''), s(y'''')) -> DIV(minus(s(x'''''), s(y'''')), s(y''''))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 9
↳Rewriting Transformation
DIV(x, s(x'')) -> IFY(true, x, s(x''))
IF(true, s(x'''''), s(y'''')) -> DIV(minus(s(x'''''), s(y'''')), s(y''''))
IFY(true, s(x''), s(y'')) -> IF(ge(x'', y''), s(x''), s(y''))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
one new Dependency Pair is created:
IF(true, s(x'''''), s(y'''')) -> DIV(minus(s(x'''''), s(y'''')), s(y''''))
IF(true, s(x'''''), s(y'''')) -> DIV(minus(x''''', y''''), s(y''''))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 10
↳Forward Instantiation Transformation
IF(true, s(x'''''), s(y'''')) -> DIV(minus(x''''', y''''), s(y''''))
IFY(true, s(x''), s(y'')) -> IF(ge(x'', y''), s(x''), s(y''))
DIV(x, s(x'')) -> IFY(true, x, s(x''))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
one new Dependency Pair is created:
DIV(x, s(x'')) -> IFY(true, x, s(x''))
DIV(s(x'''''), s(x'''')) -> IFY(true, s(x'''''), s(x''''))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 11
↳Narrowing Transformation
IFY(true, s(x''), s(y'')) -> IF(ge(x'', y''), s(x''), s(y''))
DIV(s(x'''''), s(x'''')) -> IFY(true, s(x'''''), s(x''''))
IF(true, s(x'''''), s(y'''')) -> DIV(minus(x''''', y''''), s(y''''))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
two new Dependency Pairs are created:
IF(true, s(x'''''), s(y'''')) -> DIV(minus(x''''', y''''), s(y''''))
IF(true, s(x''''''), s(0)) -> DIV(x'''''', s(0))
IF(true, s(s(x')), s(s(y'))) -> DIV(minus(x', y'), s(s(y')))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 12
↳Instantiation Transformation
IF(true, s(s(x')), s(s(y'))) -> DIV(minus(x', y'), s(s(y')))
DIV(s(x'''''), s(x'''')) -> IFY(true, s(x'''''), s(x''''))
IF(true, s(x''''''), s(0)) -> DIV(x'''''', s(0))
IFY(true, s(x''), s(y'')) -> IF(ge(x'', y''), s(x''), s(y''))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
two new Dependency Pairs are created:
DIV(s(x'''''), s(x'''')) -> IFY(true, s(x'''''), s(x''''))
DIV(s(x''''''), s(0)) -> IFY(true, s(x''''''), s(0))
DIV(s(x''''''), s(s(y'''))) -> IFY(true, s(x''''''), s(s(y''')))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 13
↳Instantiation Transformation
DIV(s(x''''''), s(0)) -> IFY(true, s(x''''''), s(0))
IF(true, s(x''''''), s(0)) -> DIV(x'''''', s(0))
IFY(true, s(x''), s(y'')) -> IF(ge(x'', y''), s(x''), s(y''))
DIV(s(x''''''), s(s(y'''))) -> IFY(true, s(x''''''), s(s(y''')))
IF(true, s(s(x')), s(s(y'))) -> DIV(minus(x', y'), s(s(y')))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
two new Dependency Pairs are created:
IFY(true, s(x''), s(y'')) -> IF(ge(x'', y''), s(x''), s(y''))
IFY(true, s(x'''), s(0)) -> IF(ge(x''', 0), s(x'''), s(0))
IFY(true, s(x'''), s(s(y'''''))) -> IF(ge(x''', s(y''''')), s(x'''), s(s(y''''')))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 14
↳Rewriting Transformation
IF(true, s(x''''''), s(0)) -> DIV(x'''''', s(0))
IFY(true, s(x'''), s(0)) -> IF(ge(x''', 0), s(x'''), s(0))
DIV(s(x''''''), s(0)) -> IFY(true, s(x''''''), s(0))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
one new Dependency Pair is created:
IFY(true, s(x'''), s(0)) -> IF(ge(x''', 0), s(x'''), s(0))
IFY(true, s(x'''), s(0)) -> IF(true, s(x'''), s(0))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 16
↳Forward Instantiation Transformation
IFY(true, s(x'''), s(0)) -> IF(true, s(x'''), s(0))
DIV(s(x''''''), s(0)) -> IFY(true, s(x''''''), s(0))
IF(true, s(x''''''), s(0)) -> DIV(x'''''', s(0))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
one new Dependency Pair is created:
IF(true, s(x''''''), s(0)) -> DIV(x'''''', s(0))
IF(true, s(s(x'''''''')), s(0)) -> DIV(s(x''''''''), s(0))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 18
↳Forward Instantiation Transformation
DIV(s(x''''''), s(0)) -> IFY(true, s(x''''''), s(0))
IF(true, s(s(x'''''''')), s(0)) -> DIV(s(x''''''''), s(0))
IFY(true, s(x'''), s(0)) -> IF(true, s(x'''), s(0))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
one new Dependency Pair is created:
IFY(true, s(x'''), s(0)) -> IF(true, s(x'''), s(0))
IFY(true, s(s(x'''''''''')), s(0)) -> IF(true, s(s(x'''''''''')), s(0))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 20
↳Argument Filtering and Ordering
IF(true, s(s(x'''''''')), s(0)) -> DIV(s(x''''''''), s(0))
IFY(true, s(s(x'''''''''')), s(0)) -> IF(true, s(s(x'''''''''')), s(0))
DIV(s(x''''''), s(0)) -> IFY(true, s(x''''''), s(0))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
IF(true, s(s(x'''''''')), s(0)) -> DIV(s(x''''''''), s(0))
IFY(x1, x2, x3) -> x2
s(x1) -> s(x1)
IF(x1, x2, x3) -> x2
DIV(x1, x2) -> x1
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 22
↳Dependency Graph
IFY(true, s(s(x'''''''''')), s(0)) -> IF(true, s(s(x'''''''''')), s(0))
DIV(s(x''''''), s(0)) -> IFY(true, s(x''''''), s(0))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 15
↳Forward Instantiation Transformation
IF(true, s(s(x')), s(s(y'))) -> DIV(minus(x', y'), s(s(y')))
IFY(true, s(x'''), s(s(y'''''))) -> IF(ge(x''', s(y''''')), s(x'''), s(s(y''''')))
DIV(s(x''''''), s(s(y'''))) -> IFY(true, s(x''''''), s(s(y''')))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
one new Dependency Pair is created:
IFY(true, s(x'''), s(s(y'''''))) -> IF(ge(x''', s(y''''')), s(x'''), s(s(y''''')))
IFY(true, s(s(x'0')), s(s(y''''''))) -> IF(ge(s(x'0'), s(y'''''')), s(s(x'0')), s(s(y'''''')))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 17
↳Rewriting Transformation
IFY(true, s(s(x'0')), s(s(y''''''))) -> IF(ge(s(x'0'), s(y'''''')), s(s(x'0')), s(s(y'''''')))
DIV(s(x''''''), s(s(y'''))) -> IFY(true, s(x''''''), s(s(y''')))
IF(true, s(s(x')), s(s(y'))) -> DIV(minus(x', y'), s(s(y')))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
one new Dependency Pair is created:
IFY(true, s(s(x'0')), s(s(y''''''))) -> IF(ge(s(x'0'), s(y'''''')), s(s(x'0')), s(s(y'''''')))
IFY(true, s(s(x'0')), s(s(y''''''))) -> IF(ge(x'0', y''''''), s(s(x'0')), s(s(y'''''')))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 19
↳Argument Filtering and Ordering
IF(true, s(s(x')), s(s(y'))) -> DIV(minus(x', y'), s(s(y')))
IFY(true, s(s(x'0')), s(s(y''''''))) -> IF(ge(x'0', y''''''), s(s(x'0')), s(s(y'''''')))
DIV(s(x''''''), s(s(y'''))) -> IFY(true, s(x''''''), s(s(y''')))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost
IF(true, s(s(x')), s(s(y'))) -> DIV(minus(x', y'), s(s(y')))
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
IF(x1, x2, x3) -> x2
s(x1) -> s(x1)
DIV(x1, x2) -> x1
minus(x1, x2) -> x1
IFY(x1, x2, x3) -> x2
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Rw
...
→DP Problem 21
↳Dependency Graph
IFY(true, s(s(x'0')), s(s(y''''''))) -> IF(ge(x'0', y''''''), s(s(x'0')), s(s(y'''''')))
DIV(s(x''''''), s(s(y'''))) -> IFY(true, s(x''''''), s(s(y''')))
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))
innermost