Term Rewriting System R:
[x, y, n, m]
app'(app'(eq, 0), 0) -> true
app'(app'(eq, 0), app'(s, x)) -> false
app'(app'(eq, app'(s, x)), 0) -> false
app'(app'(eq, app'(s, x)), app'(s, y)) -> app'(app'(eq, x), y)
app'(app'(le, 0), y) -> true
app'(app'(le, app'(s, x)), 0) -> false
app'(app'(le, app'(s, x)), app'(s, y)) -> app'(app'(le, x), y)
app'(app'(app, nil), y) -> y
app'(app'(app, app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(app, x), y))
app'(min, app'(app'(add, n), nil)) -> n
app'(min, app'(app'(add, n), app'(app'(add, m), x))) -> app'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))
app'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, n), x))
app'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, m), x))
app'(app'(rm, n), nil) -> nil
app'(app'(rm, n), app'(app'(add, m), x)) -> app'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))
app'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> app'(app'(rm, n), x)
app'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> app'(app'(add, m), app'(app'(rm, n), x))
app'(app'(minsort, nil), nil) -> nil
app'(app'(minsort, app'(app'(add, n), x)), y) -> app'(app'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x)), y)
app'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil))
app'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> app'(app'(minsort, x), app'(app'(add, n), y))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP'(app'(eq, app'(s, x)), app'(s, y)) -> APP'(app'(eq, x), y)
APP'(app'(eq, app'(s, x)), app'(s, y)) -> APP'(eq, x)
APP'(app'(le, app'(s, x)), app'(s, y)) -> APP'(app'(le, x), y)
APP'(app'(le, app'(s, x)), app'(s, y)) -> APP'(le, x)
APP'(app'(app, app'(app'(add, n), x)), y) -> APP'(app'(add, n), app'(app'(app, x), y))
APP'(app'(app, app'(app'(add, n), x)), y) -> APP'(app'(app, x), y)
APP'(app'(app, app'(app'(add, n), x)), y) -> APP'(app, x)
APP'(min, app'(app'(add, n), app'(app'(add, m), x))) -> APP'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))
APP'(min, app'(app'(add, n), app'(app'(add, m), x))) -> APP'(ifmin, app'(app'(le, n), m))
APP'(min, app'(app'(add, n), app'(app'(add, m), x))) -> APP'(app'(le, n), m)
APP'(min, app'(app'(add, n), app'(app'(add, m), x))) -> APP'(le, n)
APP'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> APP'(min, app'(app'(add, n), x))
APP'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> APP'(app'(add, n), x)
APP'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> APP'(min, app'(app'(add, m), x))
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(app'(ifrm, app'(app'(eq, n), m)), n)
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(ifrm, app'(app'(eq, n), m))
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(app'(eq, n), m)
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(eq, n)
APP'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> APP'(app'(rm, n), x)
APP'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> APP'(rm, n)
APP'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> APP'(app'(add, m), app'(app'(rm, n), x))
APP'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> APP'(app'(rm, n), x)
APP'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> APP'(rm, n)
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(app'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x)), y)
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x))
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x))))
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(app'(eq, n), app'(min, app'(app'(add, n), x)))
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(eq, n)
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(min, app'(app'(add, n), x))
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app'(add, n), app'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil))
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil)
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(minsort, app'(app'(app, app'(app'(rm, n), x)), y))
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app'(app, app'(app'(rm, n), x)), y)
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app, app'(app'(rm, n), x))
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app'(rm, n), x)
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(rm, n)
APP'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> APP'(app'(minsort, x), app'(app'(add, n), y))
APP'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> APP'(minsort, x)
APP'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> APP'(app'(add, n), y)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

APP'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> APP'(app'(add, n), y)
APP'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> APP'(app'(minsort, x), app'(app'(add, n), y))
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app'(rm, n), x)
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app'(app, app'(app'(rm, n), x)), y)
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil)
APP'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> APP'(app'(add, n), app'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil))
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(min, app'(app'(add, n), x))
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(app'(eq, n), app'(min, app'(app'(add, n), x)))
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x))
APP'(app'(minsort, app'(app'(add, n), x)), y) -> APP'(app'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x)), y)
APP'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> APP'(app'(rm, n), x)
APP'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> APP'(app'(add, m), app'(app'(rm, n), x))
APP'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> APP'(app'(rm, n), x)
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(app'(eq, n), m)
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(app'(ifrm, app'(app'(eq, n), m)), n)
APP'(app'(rm, n), app'(app'(add, m), x)) -> APP'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))
APP'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> APP'(min, app'(app'(add, m), x))
APP'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> APP'(app'(add, n), x)
APP'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> APP'(min, app'(app'(add, n), x))
APP'(min, app'(app'(add, n), app'(app'(add, m), x))) -> APP'(app'(le, n), m)
APP'(min, app'(app'(add, n), app'(app'(add, m), x))) -> APP'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))
APP'(app'(app, app'(app'(add, n), x)), y) -> APP'(app'(app, x), y)
APP'(app'(app, app'(app'(add, n), x)), y) -> APP'(app'(add, n), app'(app'(app, x), y))
APP'(app'(le, app'(s, x)), app'(s, y)) -> APP'(app'(le, x), y)
APP'(app'(eq, app'(s, x)), app'(s, y)) -> APP'(app'(eq, x), y)


Rules:


app'(app'(eq, 0), 0) -> true
app'(app'(eq, 0), app'(s, x)) -> false
app'(app'(eq, app'(s, x)), 0) -> false
app'(app'(eq, app'(s, x)), app'(s, y)) -> app'(app'(eq, x), y)
app'(app'(le, 0), y) -> true
app'(app'(le, app'(s, x)), 0) -> false
app'(app'(le, app'(s, x)), app'(s, y)) -> app'(app'(le, x), y)
app'(app'(app, nil), y) -> y
app'(app'(app, app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(app, x), y))
app'(min, app'(app'(add, n), nil)) -> n
app'(min, app'(app'(add, n), app'(app'(add, m), x))) -> app'(app'(ifmin, app'(app'(le, n), m)), app'(app'(add, n), app'(app'(add, m), x)))
app'(app'(ifmin, true), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, n), x))
app'(app'(ifmin, false), app'(app'(add, n), app'(app'(add, m), x))) -> app'(min, app'(app'(add, m), x))
app'(app'(rm, n), nil) -> nil
app'(app'(rm, n), app'(app'(add, m), x)) -> app'(app'(app'(ifrm, app'(app'(eq, n), m)), n), app'(app'(add, m), x))
app'(app'(app'(ifrm, true), n), app'(app'(add, m), x)) -> app'(app'(rm, n), x)
app'(app'(app'(ifrm, false), n), app'(app'(add, m), x)) -> app'(app'(add, m), app'(app'(rm, n), x))
app'(app'(minsort, nil), nil) -> nil
app'(app'(minsort, app'(app'(add, n), x)), y) -> app'(app'(app'(ifminsort, app'(app'(eq, n), app'(min, app'(app'(add, n), x)))), app'(app'(add, n), x)), y)
app'(app'(app'(ifminsort, true), app'(app'(add, n), x)), y) -> app'(app'(add, n), app'(app'(minsort, app'(app'(app, app'(app'(rm, n), x)), y)), nil))
app'(app'(app'(ifminsort, false), app'(app'(add, n), x)), y) -> app'(app'(minsort, x), app'(app'(add, n), y))




Termination of R could not be shown.
Duration:
0:02 minutes