R
↳Dependency Pair Analysis
MINUS(X, s(Y)) -> PRED(minus(X, Y))
MINUS(X, s(Y)) -> MINUS(X, Y)
LE(s(X), s(Y)) -> LE(X, Y)
GCD(s(X), s(Y)) -> IF(le(Y, X), s(X), s(Y))
GCD(s(X), s(Y)) -> LE(Y, X)
IF(true, s(X), s(Y)) -> GCD(minus(X, Y), s(Y))
IF(true, s(X), s(Y)) -> MINUS(X, Y)
IF(false, s(X), s(Y)) -> GCD(minus(Y, X), s(X))
IF(false, s(X), s(Y)) -> MINUS(Y, X)
R
↳DPs
→DP Problem 1
↳Argument Filtering and Ordering
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
MINUS(X, s(Y)) -> MINUS(X, Y)
minus(X, s(Y)) -> pred(minus(X, Y))
minus(X, 0) -> X
pred(s(X)) -> X
le(s(X), s(Y)) -> le(X, Y)
le(s(X), 0) -> false
le(0, Y) -> true
gcd(0, Y) -> 0
gcd(s(X), 0) -> s(X)
gcd(s(X), s(Y)) -> if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) -> gcd(minus(X, Y), s(Y))
if(false, s(X), s(Y)) -> gcd(minus(Y, X), s(X))
innermost
MINUS(X, s(Y)) -> MINUS(X, Y)
MINUS(x1, x2) -> MINUS(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
minus(X, s(Y)) -> pred(minus(X, Y))
minus(X, 0) -> X
pred(s(X)) -> X
le(s(X), s(Y)) -> le(X, Y)
le(s(X), 0) -> false
le(0, Y) -> true
gcd(0, Y) -> 0
gcd(s(X), 0) -> s(X)
gcd(s(X), s(Y)) -> if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) -> gcd(minus(X, Y), s(Y))
if(false, s(X), s(Y)) -> gcd(minus(Y, X), s(X))
innermost
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳Argument Filtering and Ordering
→DP Problem 3
↳Nar
LE(s(X), s(Y)) -> LE(X, Y)
minus(X, s(Y)) -> pred(minus(X, Y))
minus(X, 0) -> X
pred(s(X)) -> X
le(s(X), s(Y)) -> le(X, Y)
le(s(X), 0) -> false
le(0, Y) -> true
gcd(0, Y) -> 0
gcd(s(X), 0) -> s(X)
gcd(s(X), s(Y)) -> if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) -> gcd(minus(X, Y), s(Y))
if(false, s(X), s(Y)) -> gcd(minus(Y, X), s(X))
innermost
LE(s(X), s(Y)) -> LE(X, Y)
LE(x1, x2) -> LE(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
minus(X, s(Y)) -> pred(minus(X, Y))
minus(X, 0) -> X
pred(s(X)) -> X
le(s(X), s(Y)) -> le(X, Y)
le(s(X), 0) -> false
le(0, Y) -> true
gcd(0, Y) -> 0
gcd(s(X), 0) -> s(X)
gcd(s(X), s(Y)) -> if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) -> gcd(minus(X, Y), s(Y))
if(false, s(X), s(Y)) -> gcd(minus(Y, X), s(X))
innermost
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Narrowing Transformation
IF(false, s(X), s(Y)) -> GCD(minus(Y, X), s(X))
IF(true, s(X), s(Y)) -> GCD(minus(X, Y), s(Y))
GCD(s(X), s(Y)) -> IF(le(Y, X), s(X), s(Y))
minus(X, s(Y)) -> pred(minus(X, Y))
minus(X, 0) -> X
pred(s(X)) -> X
le(s(X), s(Y)) -> le(X, Y)
le(s(X), 0) -> false
le(0, Y) -> true
gcd(0, Y) -> 0
gcd(s(X), 0) -> s(X)
gcd(s(X), s(Y)) -> if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) -> gcd(minus(X, Y), s(Y))
if(false, s(X), s(Y)) -> gcd(minus(Y, X), s(X))
innermost
three new Dependency Pairs are created:
GCD(s(X), s(Y)) -> IF(le(Y, X), s(X), s(Y))
GCD(s(s(Y'')), s(s(X''))) -> IF(le(X'', Y''), s(s(Y'')), s(s(X'')))
GCD(s(0), s(s(X''))) -> IF(false, s(0), s(s(X'')))
GCD(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
↳Narrowing Transformation
GCD(s(X'), s(0)) -> IF(true, s(X'), s(0))
GCD(s(0), s(s(X''))) -> IF(false, s(0), s(s(X'')))
IF(true, s(X), s(Y)) -> GCD(minus(X, Y), s(Y))
GCD(s(s(Y'')), s(s(X''))) -> IF(le(X'', Y''), s(s(Y'')), s(s(X'')))
IF(false, s(X), s(Y)) -> GCD(minus(Y, X), s(X))
minus(X, s(Y)) -> pred(minus(X, Y))
minus(X, 0) -> X
pred(s(X)) -> X
le(s(X), s(Y)) -> le(X, Y)
le(s(X), 0) -> false
le(0, Y) -> true
gcd(0, Y) -> 0
gcd(s(X), 0) -> s(X)
gcd(s(X), s(Y)) -> if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) -> gcd(minus(X, Y), s(Y))
if(false, s(X), s(Y)) -> gcd(minus(Y, X), s(X))
innermost
two new Dependency Pairs are created:
IF(true, s(X), s(Y)) -> GCD(minus(X, Y), s(Y))
IF(true, s(X''), s(s(Y''))) -> GCD(pred(minus(X'', Y'')), s(s(Y'')))
IF(true, s(X''), s(0)) -> GCD(X'', s(0))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Nar
...
→DP Problem 7
↳Forward Instantiation Transformation
IF(true, s(X''), s(0)) -> GCD(X'', s(0))
GCD(s(X'), s(0)) -> IF(true, s(X'), s(0))
minus(X, s(Y)) -> pred(minus(X, Y))
minus(X, 0) -> X
pred(s(X)) -> X
le(s(X), s(Y)) -> le(X, Y)
le(s(X), 0) -> false
le(0, Y) -> true
gcd(0, Y) -> 0
gcd(s(X), 0) -> s(X)
gcd(s(X), s(Y)) -> if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) -> gcd(minus(X, Y), s(Y))
if(false, s(X), s(Y)) -> gcd(minus(Y, X), s(X))
innermost
one new Dependency Pair is created:
IF(true, s(X''), s(0)) -> GCD(X'', s(0))
IF(true, s(s(X'''')), s(0)) -> GCD(s(X''''), s(0))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Nar
...
→DP Problem 9
↳Forward Instantiation Transformation
IF(true, s(s(X'''')), s(0)) -> GCD(s(X''''), s(0))
GCD(s(X'), s(0)) -> IF(true, s(X'), s(0))
minus(X, s(Y)) -> pred(minus(X, Y))
minus(X, 0) -> X
pred(s(X)) -> X
le(s(X), s(Y)) -> le(X, Y)
le(s(X), 0) -> false
le(0, Y) -> true
gcd(0, Y) -> 0
gcd(s(X), 0) -> s(X)
gcd(s(X), s(Y)) -> if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) -> gcd(minus(X, Y), s(Y))
if(false, s(X), s(Y)) -> gcd(minus(Y, X), s(X))
innermost
one new Dependency Pair is created:
GCD(s(X'), s(0)) -> IF(true, s(X'), s(0))
GCD(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
↳Nar
...
→DP Problem 11
↳Argument Filtering and Ordering
GCD(s(s(X'''''')), s(0)) -> IF(true, s(s(X'''''')), s(0))
IF(true, s(s(X'''')), s(0)) -> GCD(s(X''''), s(0))
minus(X, s(Y)) -> pred(minus(X, Y))
minus(X, 0) -> X
pred(s(X)) -> X
le(s(X), s(Y)) -> le(X, Y)
le(s(X), 0) -> false
le(0, Y) -> true
gcd(0, Y) -> 0
gcd(s(X), 0) -> s(X)
gcd(s(X), s(Y)) -> if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) -> gcd(minus(X, Y), s(Y))
if(false, s(X), s(Y)) -> gcd(minus(Y, X), s(X))
innermost
IF(true, s(s(X'''')), s(0)) -> GCD(s(X''''), s(0))
IF(x1, x2, x3) -> x2
s(x1) -> s(x1)
GCD(x1, x2) -> x1
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Nar
...
→DP Problem 14
↳Dependency Graph
GCD(s(s(X'''''')), s(0)) -> IF(true, s(s(X'''''')), s(0))
minus(X, s(Y)) -> pred(minus(X, Y))
minus(X, 0) -> X
pred(s(X)) -> X
le(s(X), s(Y)) -> le(X, Y)
le(s(X), 0) -> false
le(0, Y) -> true
gcd(0, Y) -> 0
gcd(s(X), 0) -> s(X)
gcd(s(X), s(Y)) -> if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) -> gcd(minus(X, Y), s(Y))
if(false, s(X), s(Y)) -> gcd(minus(Y, X), s(X))
innermost
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Nar
...
→DP Problem 8
↳Narrowing Transformation
IF(true, s(X''), s(s(Y''))) -> GCD(pred(minus(X'', Y'')), s(s(Y'')))
GCD(s(s(Y'')), s(s(X''))) -> IF(le(X'', Y''), s(s(Y'')), s(s(X'')))
IF(false, s(X), s(Y)) -> GCD(minus(Y, X), s(X))
GCD(s(0), s(s(X''))) -> IF(false, s(0), s(s(X'')))
minus(X, s(Y)) -> pred(minus(X, Y))
minus(X, 0) -> X
pred(s(X)) -> X
le(s(X), s(Y)) -> le(X, Y)
le(s(X), 0) -> false
le(0, Y) -> true
gcd(0, Y) -> 0
gcd(s(X), 0) -> s(X)
gcd(s(X), s(Y)) -> if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) -> gcd(minus(X, Y), s(Y))
if(false, s(X), s(Y)) -> gcd(minus(Y, X), s(X))
innermost
two new Dependency Pairs are created:
IF(false, s(X), s(Y)) -> GCD(minus(Y, X), s(X))
IF(false, s(s(Y'')), s(Y0)) -> GCD(pred(minus(Y0, Y'')), s(s(Y'')))
IF(false, s(0), s(Y')) -> GCD(Y', s(0))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Nar
...
→DP Problem 10
↳Instantiation Transformation
IF(false, s(s(Y'')), s(Y0)) -> GCD(pred(minus(Y0, Y'')), s(s(Y'')))
GCD(s(s(Y'')), s(s(X''))) -> IF(le(X'', Y''), s(s(Y'')), s(s(X'')))
IF(true, s(X''), s(s(Y''))) -> GCD(pred(minus(X'', Y'')), s(s(Y'')))
minus(X, s(Y)) -> pred(minus(X, Y))
minus(X, 0) -> X
pred(s(X)) -> X
le(s(X), s(Y)) -> le(X, Y)
le(s(X), 0) -> false
le(0, Y) -> true
gcd(0, Y) -> 0
gcd(s(X), 0) -> s(X)
gcd(s(X), s(Y)) -> if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) -> gcd(minus(X, Y), s(Y))
if(false, s(X), s(Y)) -> gcd(minus(Y, X), s(X))
innermost
one new Dependency Pair is created:
IF(true, s(X''), s(s(Y''))) -> GCD(pred(minus(X'', Y'')), s(s(Y'')))
IF(true, s(s(Y''''')), s(s(Y''''))) -> GCD(pred(minus(s(Y'''''), Y'''')), s(s(Y'''')))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Nar
...
→DP Problem 12
↳Instantiation Transformation
IF(true, s(s(Y''''')), s(s(Y''''))) -> GCD(pred(minus(s(Y'''''), Y'''')), s(s(Y'''')))
GCD(s(s(Y'')), s(s(X''))) -> IF(le(X'', Y''), s(s(Y'')), s(s(X'')))
IF(false, s(s(Y'')), s(Y0)) -> GCD(pred(minus(Y0, Y'')), s(s(Y'')))
minus(X, s(Y)) -> pred(minus(X, Y))
minus(X, 0) -> X
pred(s(X)) -> X
le(s(X), s(Y)) -> le(X, Y)
le(s(X), 0) -> false
le(0, Y) -> true
gcd(0, Y) -> 0
gcd(s(X), 0) -> s(X)
gcd(s(X), s(Y)) -> if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) -> gcd(minus(X, Y), s(Y))
if(false, s(X), s(Y)) -> gcd(minus(Y, X), s(X))
innermost
one new Dependency Pair is created:
IF(false, s(s(Y'')), s(Y0)) -> GCD(pred(minus(Y0, Y'')), s(s(Y'')))
IF(false, s(s(Y'''')), s(s(X''''))) -> GCD(pred(minus(s(X''''), Y'''')), s(s(Y'''')))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳AFS
→DP Problem 3
↳Nar
→DP Problem 6
↳Nar
...
→DP Problem 13
↳Remaining Obligation(s)
IF(false, s(s(Y'''')), s(s(X''''))) -> GCD(pred(minus(s(X''''), Y'''')), s(s(Y'''')))
GCD(s(s(Y'')), s(s(X''))) -> IF(le(X'', Y''), s(s(Y'')), s(s(X'')))
IF(true, s(s(Y''''')), s(s(Y''''))) -> GCD(pred(minus(s(Y'''''), Y'''')), s(s(Y'''')))
minus(X, s(Y)) -> pred(minus(X, Y))
minus(X, 0) -> X
pred(s(X)) -> X
le(s(X), s(Y)) -> le(X, Y)
le(s(X), 0) -> false
le(0, Y) -> true
gcd(0, Y) -> 0
gcd(s(X), 0) -> s(X)
gcd(s(X), s(Y)) -> if(le(Y, X), s(X), s(Y))
if(true, s(X), s(Y)) -> gcd(minus(X, Y), s(Y))
if(false, s(X), s(Y)) -> gcd(minus(Y, X), s(X))
innermost