Term Rewriting System R:
[X, Y]
fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X

Termination of R to be shown.

`   R`
`     ↳Dependency Pair Analysis`

R contains the following Dependency Pairs:

FACT(X) -> IF(zero(X), s(0), prod(X, fact(p(X))))
FACT(X) -> ZERO(X)
FACT(X) -> PROD(X, fact(p(X)))
FACT(X) -> FACT(p(X))
FACT(X) -> P(X)
ADD(s(X), Y) -> ADD(X, Y)
PROD(s(X), Y) -> ADD(Y, prod(X, Y))
PROD(s(X), Y) -> PROD(X, Y)

Furthermore, R contains three SCCs.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Remaining Obligation(s)`
`       →DP Problem 2`
`         ↳Remaining Obligation(s)`
`       →DP Problem 3`
`         ↳Remaining Obligation(s)`

The following remains to be proven:
• Dependency Pair:

ADD(s(X), Y) -> ADD(X, Y)

Rules:

fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X

• Dependency Pair:

PROD(s(X), Y) -> PROD(X, Y)

Rules:

fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X

• Dependency Pair:

FACT(X) -> FACT(p(X))

Rules:

fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Remaining Obligation(s)`
`       →DP Problem 2`
`         ↳Remaining Obligation(s)`
`       →DP Problem 3`
`         ↳Remaining Obligation(s)`

The following remains to be proven:
• Dependency Pair:

ADD(s(X), Y) -> ADD(X, Y)

Rules:

fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X

• Dependency Pair:

PROD(s(X), Y) -> PROD(X, Y)

Rules:

fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X

• Dependency Pair:

FACT(X) -> FACT(p(X))

Rules:

fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Remaining Obligation(s)`
`       →DP Problem 2`
`         ↳Remaining Obligation(s)`
`       →DP Problem 3`
`         ↳Remaining Obligation(s)`

The following remains to be proven:
• Dependency Pair:

ADD(s(X), Y) -> ADD(X, Y)

Rules:

fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X

• Dependency Pair:

PROD(s(X), Y) -> PROD(X, Y)

Rules:

fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X

• Dependency Pair:

FACT(X) -> FACT(p(X))

Rules:

fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X

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