Term Rewriting System R:
[x, y]
p(0) -> 0
p(s(x)) -> x
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(x, s(y)) -> if(le(x, s(y)), 0, p(minus(x, p(s(y)))))
if(true, x, y) -> x
if(false, x, y) -> y

Termination of R to be shown.

R
Dependency Pair Analysis

R contains the following Dependency Pairs:

LE(s(x), s(y)) -> LE(x, y)
MINUS(x, s(y)) -> IF(le(x, s(y)), 0, p(minus(x, p(s(y)))))
MINUS(x, s(y)) -> LE(x, s(y))
MINUS(x, s(y)) -> P(minus(x, p(s(y))))
MINUS(x, s(y)) -> MINUS(x, p(s(y)))
MINUS(x, s(y)) -> P(s(y))

Furthermore, R contains two SCCs.

R
DPs
→DP Problem 1
Argument Filtering and Ordering
→DP Problem 2
Remaining

Dependency Pair:

LE(s(x), s(y)) -> LE(x, y)

Rules:

p(0) -> 0
p(s(x)) -> x
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(x, s(y)) -> if(le(x, s(y)), 0, p(minus(x, p(s(y)))))
if(true, x, y) -> x
if(false, x, y) -> y

The following dependency pair can be strictly oriented:

LE(s(x), s(y)) -> LE(x, y)

The following rules can be oriented:

p(0) -> 0
p(s(x)) -> x
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(x, s(y)) -> if(le(x, s(y)), 0, p(minus(x, p(s(y)))))
if(true, x, y) -> x
if(false, x, y) -> y

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(LE(x1, x2)) =  1 + x1 + x2 POL(if(x1, x2)) =  x1 + x2 POL(0) =  0 POL(false) =  0 POL(minus(x1, x2)) =  x1 + x2 POL(true) =  0 POL(s(x1)) =  1 + x1 POL(le(x1, x2)) =  x1 + x2 POL(p(x1)) =  x1

resulting in one new DP problem.
Used Argument Filtering System:
LE(x1, x2) -> LE(x1, x2)
s(x1) -> s(x1)
p(x1) -> p(x1)
le(x1, x2) -> le(x1, x2)
minus(x1, x2) -> minus(x1, x2)
if(x1, x2, x3) -> if(x2, x3)

R
DPs
→DP Problem 1
AFS
→DP Problem 3
Dependency Graph
→DP Problem 2
Remaining

Dependency Pair:

Rules:

p(0) -> 0
p(s(x)) -> x
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(x, s(y)) -> if(le(x, s(y)), 0, p(minus(x, p(s(y)))))
if(true, x, y) -> x
if(false, x, y) -> y

Using the Dependency Graph resulted in no new DP problems.

R
DPs
→DP Problem 1
AFS
→DP Problem 2
Remaining Obligation(s)

The following remains to be proven:
Dependency Pair:

MINUS(x, s(y)) -> MINUS(x, p(s(y)))

Rules:

p(0) -> 0
p(s(x)) -> x
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(x, s(y)) -> if(le(x, s(y)), 0, p(minus(x, p(s(y)))))
if(true, x, y) -> x
if(false, x, y) -> y

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