R
↳Dependency Pair Analysis
LE(s(x), s(y)) -> LE(x, y)
MINUS(s(x), s(y)) -> MINUS(x, y)
GCD(s(x), s(y)) -> IFGCD(le(y, x), s(x), s(y))
GCD(s(x), s(y)) -> LE(y, x)
IFGCD(true, x, y) -> GCD(minus(x, y), y)
IFGCD(true, x, y) -> MINUS(x, y)
IFGCD(false, x, y) -> GCD(minus(y, x), x)
IFGCD(false, x, y) -> MINUS(y, x)
R
↳DPs
→DP Problem 1
↳Usable Rules (Innermost)
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
LE(s(x), s(y)) -> LE(x, y)
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)
innermost
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 4
↳Size-Change Principle
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
LE(s(x), s(y)) -> LE(x, y)
none
innermost
|
|
trivial
s(x1) -> s(x1)
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳Usable Rules (Innermost)
→DP Problem 3
↳UsableRules
MINUS(s(x), s(y)) -> MINUS(x, y)
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)
innermost
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 5
↳Size-Change Principle
→DP Problem 3
↳UsableRules
MINUS(s(x), s(y)) -> MINUS(x, y)
none
innermost
|
|
trivial
s(x1) -> s(x1)
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳Usable Rules (Innermost)
IFGCD(false, x, y) -> GCD(minus(y, x), x)
IFGCD(true, x, y) -> GCD(minus(x, y), y)
GCD(s(x), s(y)) -> IFGCD(le(y, x), s(x), s(y))
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
minus(s(x), s(y)) -> minus(x, y)
gcd(0, y) -> y
gcd(s(x), 0) -> s(x)
gcd(s(x), s(y)) -> ifgcd(le(y, x), s(x), s(y))
ifgcd(true, x, y) -> gcd(minus(x, y), y)
ifgcd(false, x, y) -> gcd(minus(y, x), x)
innermost
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
→DP Problem 6
↳Narrowing Transformation
IFGCD(false, x, y) -> GCD(minus(y, x), x)
IFGCD(true, x, y) -> GCD(minus(x, y), y)
GCD(s(x), s(y)) -> IFGCD(le(y, x), s(x), s(y))
minus(s(x), s(y)) -> minus(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
le(s(x), s(y)) -> le(x, y)
le(0, y) -> true
le(s(x), 0) -> false
innermost
three new Dependency Pairs are created:
IFGCD(false, x, y) -> GCD(minus(y, x), x)
IFGCD(false, s(y''), s(x'')) -> GCD(minus(x'', y''), s(y''))
IFGCD(false, 0, y') -> GCD(y', 0)
IFGCD(false, x'', 0) -> GCD(0, x'')
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
→DP Problem 6
↳Nar
...
→DP Problem 7
↳Narrowing Transformation
IFGCD(false, s(y''), s(x'')) -> GCD(minus(x'', y''), s(y''))
GCD(s(x), s(y)) -> IFGCD(le(y, x), s(x), s(y))
IFGCD(true, x, y) -> GCD(minus(x, y), y)
minus(s(x), s(y)) -> minus(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
le(s(x), s(y)) -> le(x, y)
le(0, y) -> true
le(s(x), 0) -> false
innermost
three new Dependency Pairs are created:
IFGCD(true, x, y) -> GCD(minus(x, y), y)
IFGCD(true, s(x''), s(y'')) -> GCD(minus(x'', y''), s(y''))
IFGCD(true, x'', 0) -> GCD(x'', 0)
IFGCD(true, 0, y') -> GCD(0, y')
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
→DP Problem 6
↳Nar
...
→DP Problem 8
↳Narrowing Transformation
IFGCD(true, s(x''), s(y'')) -> GCD(minus(x'', y''), s(y''))
GCD(s(x), s(y)) -> IFGCD(le(y, x), s(x), s(y))
IFGCD(false, s(y''), s(x'')) -> GCD(minus(x'', y''), s(y''))
minus(s(x), s(y)) -> minus(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
le(s(x), s(y)) -> le(x, y)
le(0, y) -> true
le(s(x), 0) -> false
innermost
three new Dependency Pairs are created:
GCD(s(x), s(y)) -> IFGCD(le(y, x), s(x), s(y))
GCD(s(s(y'')), s(s(x''))) -> IFGCD(le(x'', y''), s(s(y'')), s(s(x'')))
GCD(s(x'), s(0)) -> IFGCD(true, s(x'), s(0))
GCD(s(0), s(s(x''))) -> IFGCD(false, s(0), s(s(x'')))
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
→DP Problem 6
↳Nar
...
→DP Problem 9
↳Instantiation Transformation
GCD(s(0), s(s(x''))) -> IFGCD(false, s(0), s(s(x'')))
GCD(s(x'), s(0)) -> IFGCD(true, s(x'), s(0))
IFGCD(false, s(y''), s(x'')) -> GCD(minus(x'', y''), s(y''))
GCD(s(s(y'')), s(s(x''))) -> IFGCD(le(x'', y''), s(s(y'')), s(s(x'')))
IFGCD(true, s(x''), s(y'')) -> GCD(minus(x'', y''), s(y''))
minus(s(x), s(y)) -> minus(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
le(s(x), s(y)) -> le(x, y)
le(0, y) -> true
le(s(x), 0) -> false
innermost
two new Dependency Pairs are created:
IFGCD(false, s(y''), s(x'')) -> GCD(minus(x'', y''), s(y''))
IFGCD(false, s(s(y'''')), s(s(x''''))) -> GCD(minus(s(x''''), s(y'''')), s(s(y'''')))
IFGCD(false, s(0), s(s(x''''))) -> GCD(minus(s(x''''), 0), s(0))
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
→DP Problem 6
↳Nar
...
→DP Problem 10
↳Rewriting Transformation
IFGCD(false, s(s(y'''')), s(s(x''''))) -> GCD(minus(s(x''''), s(y'''')), s(s(y'''')))
GCD(s(s(y'')), s(s(x''))) -> IFGCD(le(x'', y''), s(s(y'')), s(s(x'')))
IFGCD(true, s(x''), s(y'')) -> GCD(minus(x'', y''), s(y''))
GCD(s(x'), s(0)) -> IFGCD(true, s(x'), s(0))
IFGCD(false, s(0), s(s(x''''))) -> GCD(minus(s(x''''), 0), s(0))
GCD(s(0), s(s(x''))) -> IFGCD(false, s(0), s(s(x'')))
minus(s(x), s(y)) -> minus(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
le(s(x), s(y)) -> le(x, y)
le(0, y) -> true
le(s(x), 0) -> false
innermost
one new Dependency Pair is created:
IFGCD(false, s(0), s(s(x''''))) -> GCD(minus(s(x''''), 0), s(0))
IFGCD(false, s(0), s(s(x''''))) -> GCD(s(x''''), s(0))
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
→DP Problem 6
↳Nar
...
→DP Problem 11
↳Instantiation Transformation
IFGCD(false, s(0), s(s(x''''))) -> GCD(s(x''''), s(0))
GCD(s(0), s(s(x''))) -> IFGCD(false, s(0), s(s(x'')))
GCD(s(x'), s(0)) -> IFGCD(true, s(x'), s(0))
IFGCD(true, s(x''), s(y'')) -> GCD(minus(x'', y''), s(y''))
GCD(s(s(y'')), s(s(x''))) -> IFGCD(le(x'', y''), s(s(y'')), s(s(x'')))
IFGCD(false, s(s(y'''')), s(s(x''''))) -> GCD(minus(s(x''''), s(y'''')), s(s(y'''')))
minus(s(x), s(y)) -> minus(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
le(s(x), s(y)) -> le(x, y)
le(0, y) -> true
le(s(x), 0) -> false
innermost
two new Dependency Pairs are created:
IFGCD(true, s(x''), s(y'')) -> GCD(minus(x'', y''), s(y''))
IFGCD(true, s(s(y'''')), s(s(x''''))) -> GCD(minus(s(y''''), s(x'''')), s(s(x'''')))
IFGCD(true, s(x''''), s(0)) -> GCD(minus(x'''', 0), s(0))
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
→DP Problem 6
↳Nar
...
→DP Problem 12
↳Usable Rules (Innermost)
IFGCD(true, s(x''''), s(0)) -> GCD(minus(x'''', 0), s(0))
GCD(s(x'), s(0)) -> IFGCD(true, s(x'), s(0))
minus(s(x), s(y)) -> minus(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
le(s(x), s(y)) -> le(x, y)
le(0, y) -> true
le(s(x), 0) -> false
innermost
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
→DP Problem 6
↳Nar
...
→DP Problem 14
↳Modular Removal of Rules
IFGCD(true, s(x''''), s(0)) -> GCD(minus(x'''', 0), s(0))
GCD(s(x'), s(0)) -> IFGCD(true, s(x'), s(0))
minus(x, 0) -> x
minus(0, x) -> 0
innermost
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
minus(x, 0) -> x
minus(0, x) -> 0
POL(0) = 0 POL(GCD(x1, x2)) = x1 + x2 POL(minus(x1, x2)) = x1 + x2 POL(IF_GCD(x1, x2, x3)) = x1 + x2 + x3 POL(true) = 0 POL(s(x1)) = 1 + x1
IFGCD(true, s(x''''), s(0)) -> GCD(minus(x'''', 0), s(0))
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
→DP Problem 6
↳Nar
...
→DP Problem 15
↳Modular Removal of Rules
GCD(s(x'), s(0)) -> IFGCD(true, s(x'), s(0))
minus(x, 0) -> x
minus(0, x) -> 0
innermost
POL(0) = 0 POL(GCD(x1, x2)) = x1 + x2 POL(IF_GCD(x1, x2, x3)) = x1 + x2 + x3 POL(true) = 0 POL(s(x1)) = x1
GCD(s(x'), s(0)) -> IFGCD(true, s(x'), s(0))
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
→DP Problem 6
↳Nar
...
→DP Problem 13
↳Negative Polynomial Order
IFGCD(true, s(s(y'''')), s(s(x''''))) -> GCD(minus(s(y''''), s(x'''')), s(s(x'''')))
IFGCD(false, s(s(y'''')), s(s(x''''))) -> GCD(minus(s(x''''), s(y'''')), s(s(y'''')))
GCD(s(s(y'')), s(s(x''))) -> IFGCD(le(x'', y''), s(s(y'')), s(s(x'')))
minus(s(x), s(y)) -> minus(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
le(s(x), s(y)) -> le(x, y)
le(0, y) -> true
le(s(x), 0) -> false
innermost
IFGCD(true, s(s(y'''')), s(s(x''''))) -> GCD(minus(s(y''''), s(x'''')), s(s(x'''')))
IFGCD(false, s(s(y'''')), s(s(x''''))) -> GCD(minus(s(x''''), s(y'''')), s(s(y'''')))
minus(s(x), s(y)) -> minus(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
le(s(x), s(y)) -> le(x, y)
le(0, y) -> true
le(s(x), 0) -> false
POL( IFGCD(x1, ..., x3) ) = x2 + x3
POL( s(x1) ) = x1 + 1
POL( GCD(x1, x2) ) = x1 + x2
POL( minus(x1, x2) ) = x1
POL( 0 ) = 0
POL( le(x1, x2) ) = 0
POL( true ) = 0
POL( false ) = 0
R
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
→DP Problem 6
↳Nar
...
→DP Problem 16
↳Dependency Graph
GCD(s(s(y'')), s(s(x''))) -> IFGCD(le(x'', y''), s(s(y'')), s(s(x'')))
minus(s(x), s(y)) -> minus(x, y)
minus(x, 0) -> x
minus(0, x) -> 0
le(s(x), s(y)) -> le(x, y)
le(0, y) -> true
le(s(x), 0) -> false
innermost