R
↳Overlay and local confluence Check
R
↳OC
→TRS2
↳Dependency Pair Analysis
AP(ap(map, f), xs) -> AP(ap(ap(if, ap(isEmpty, xs)), f), xs)
AP(ap(map, f), xs) -> AP(ap(if, ap(isEmpty, xs)), f)
AP(ap(map, f), xs) -> AP(if, ap(isEmpty, xs))
AP(ap(map, f), xs) -> AP(isEmpty, xs)
AP(ap(ap(if, null), f), xs) -> AP(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
AP(ap(ap(if, null), f), xs) -> AP(cons, ap(f, ap(last, xs)))
AP(ap(ap(if, null), f), xs) -> AP(f, ap(last, xs))
AP(ap(ap(if, null), f), xs) -> AP(last, xs)
AP(ap(ap(if, null), f), xs) -> AP(ap(if2, f), xs)
AP(ap(ap(if, null), f), xs) -> AP(if2, f)
AP(ap(if2, f), xs) -> AP(ap(map, f), ap(dropLast, xs))
AP(ap(if2, f), xs) -> AP(map, f)
AP(ap(if2, f), xs) -> AP(dropLast, xs)
AP(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> AP(last, ap(ap(cons, y), ys))
AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> AP(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))
AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> AP(dropLast, ap(ap(cons, y), ys))
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳Usable Rules (Innermost)
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
AP(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> AP(last, ap(ap(cons, y), ys))
ap(ap(map, f), xs) -> ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) -> null
ap(ap(ap(if, null), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) -> ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) -> true
ap(isEmpty, ap(ap(cons, x), xs)) -> null
ap(last, ap(ap(cons, x), null)) -> x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) -> null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))
innermost
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
...
→DP Problem 4
↳A-Transformation
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
AP(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> AP(last, ap(ap(cons, y), ys))
none
innermost
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
...
→DP Problem 5
↳Size-Change Principle
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
LAST(cons(x, cons(y, ys))) -> LAST(cons(y, ys))
none
innermost
|
|
trivial
cons(x1, x2) -> cons(x1, x2)
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳Usable Rules (Innermost)
→DP Problem 3
↳UsableRules
AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> AP(dropLast, ap(ap(cons, y), ys))
ap(ap(map, f), xs) -> ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) -> null
ap(ap(ap(if, null), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) -> ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) -> true
ap(isEmpty, ap(ap(cons, x), xs)) -> null
ap(last, ap(ap(cons, x), null)) -> x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) -> null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))
innermost
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
...
→DP Problem 6
↳A-Transformation
→DP Problem 3
↳UsableRules
AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> AP(dropLast, ap(ap(cons, y), ys))
none
innermost
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
...
→DP Problem 7
↳Size-Change Principle
→DP Problem 3
↳UsableRules
DROPLAST(cons(x, cons(y, ys))) -> DROPLAST(cons(y, ys))
none
innermost
|
|
trivial
cons(x1, x2) -> cons(x1, x2)
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳Usable Rules (Innermost)
AP(ap(if2, f), xs) -> AP(ap(map, f), ap(dropLast, xs))
AP(ap(ap(if, null), f), xs) -> AP(ap(if2, f), xs)
AP(ap(ap(if, null), f), xs) -> AP(f, ap(last, xs))
AP(ap(map, f), xs) -> AP(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(map, f), xs) -> ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) -> null
ap(ap(ap(if, null), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) -> ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) -> true
ap(isEmpty, ap(ap(cons, x), xs)) -> null
ap(last, ap(ap(cons, x), null)) -> x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) -> null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))
innermost
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
...
→DP Problem 8
↳Narrowing Transformation
AP(ap(if2, f), xs) -> AP(ap(map, f), ap(dropLast, xs))
AP(ap(ap(if, null), f), xs) -> AP(ap(if2, f), xs)
AP(ap(ap(if, null), f), xs) -> AP(f, ap(last, xs))
AP(ap(map, f), xs) -> AP(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(dropLast, ap(ap(cons, x), null)) -> null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))
ap(last, ap(ap(cons, x), null)) -> x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys))
ap(isEmpty, null) -> true
ap(isEmpty, ap(ap(cons, x), xs)) -> null
innermost
two new Dependency Pairs are created:
AP(ap(map, f), xs) -> AP(ap(ap(if, ap(isEmpty, xs)), f), xs)
AP(ap(map, f), null) -> AP(ap(ap(if, true), f), null)
AP(ap(map, f), ap(ap(cons, x'), xs'')) -> AP(ap(ap(if, null), f), ap(ap(cons, x'), xs''))
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
...
→DP Problem 9
↳Narrowing Transformation
AP(ap(ap(if, null), f), xs) -> AP(ap(if2, f), xs)
AP(ap(ap(if, null), f), xs) -> AP(f, ap(last, xs))
AP(ap(map, f), ap(ap(cons, x'), xs'')) -> AP(ap(ap(if, null), f), ap(ap(cons, x'), xs''))
AP(ap(if2, f), xs) -> AP(ap(map, f), ap(dropLast, xs))
ap(dropLast, ap(ap(cons, x), null)) -> null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))
ap(last, ap(ap(cons, x), null)) -> x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys))
ap(isEmpty, null) -> true
ap(isEmpty, ap(ap(cons, x), xs)) -> null
innermost
two new Dependency Pairs are created:
AP(ap(if2, f), xs) -> AP(ap(map, f), ap(dropLast, xs))
AP(ap(if2, f), ap(ap(cons, x'), null)) -> AP(ap(map, f), null)
AP(ap(if2, f), ap(ap(cons, x'), ap(ap(cons, y'), ys'))) -> AP(ap(map, f), ap(ap(cons, x'), ap(dropLast, ap(ap(cons, y'), ys'))))
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
...
→DP Problem 10
↳Usable Rules (Innermost)
AP(ap(ap(if, null), f), xs) -> AP(f, ap(last, xs))
AP(ap(map, f), ap(ap(cons, x'), xs'')) -> AP(ap(ap(if, null), f), ap(ap(cons, x'), xs''))
AP(ap(if2, f), ap(ap(cons, x'), ap(ap(cons, y'), ys'))) -> AP(ap(map, f), ap(ap(cons, x'), ap(dropLast, ap(ap(cons, y'), ys'))))
AP(ap(ap(if, null), f), xs) -> AP(ap(if2, f), xs)
ap(dropLast, ap(ap(cons, x), null)) -> null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))
ap(last, ap(ap(cons, x), null)) -> x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys))
ap(isEmpty, null) -> true
ap(isEmpty, ap(ap(cons, x), xs)) -> null
innermost
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
...
→DP Problem 11
↳Modular Removal of Rules
AP(ap(ap(if, null), f), xs) -> AP(f, ap(last, xs))
AP(ap(map, f), ap(ap(cons, x'), xs'')) -> AP(ap(ap(if, null), f), ap(ap(cons, x'), xs''))
AP(ap(if2, f), ap(ap(cons, x'), ap(ap(cons, y'), ys'))) -> AP(ap(map, f), ap(ap(cons, x'), ap(dropLast, ap(ap(cons, y'), ys'))))
AP(ap(ap(if, null), f), xs) -> AP(ap(if2, f), xs)
ap(last, ap(ap(cons, x), null)) -> x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) -> null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))
innermost
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
ap(last, ap(ap(cons, x), null)) -> x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) -> null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))
POL(last) = 0 POL(if) = 0 POL(dropLast) = 0 POL(ap(x1, x2)) = x1 + x2 POL(null) = 1 POL(cons) = 0 POL(map) = 1 POL(if2) = 1 POL(AP(x1, x2)) = 1 + x1 + x2
AP(ap(ap(if, null), f), xs) -> AP(f, ap(last, xs))
ap(last, ap(ap(cons, x), null)) -> x
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
...
→DP Problem 12
↳Modular Removal of Rules
AP(ap(map, f), ap(ap(cons, x'), xs'')) -> AP(ap(ap(if, null), f), ap(ap(cons, x'), xs''))
AP(ap(if2, f), ap(ap(cons, x'), ap(ap(cons, y'), ys'))) -> AP(ap(map, f), ap(ap(cons, x'), ap(dropLast, ap(ap(cons, y'), ys'))))
AP(ap(ap(if, null), f), xs) -> AP(ap(if2, f), xs)
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) -> null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))
innermost
AP(ap(map, f), ap(ap(cons, x'), xs'')) -> AP(ap(ap(if, null), f), ap(ap(cons, x'), xs''))
AP(ap(if2, f), ap(ap(cons, x'), ap(ap(cons, y'), ys'))) -> AP(ap(map, f), ap(ap(cons, x'), ap(dropLast, ap(ap(cons, y'), ys'))))
AP(ap(ap(if, null), f), xs) -> AP(ap(if2, f), xs)
ap(dropLast, ap(ap(cons, x), null)) -> null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))
MAP(f, cons(x', xs'')) -> IF(null, f, cons(x', xs''))
IF2(f, cons(x', cons(y', ys'))) -> MAP(f, cons(x', dropLast(cons(y', ys'))))
IF(null, f, xs) -> IF2(f, xs)
dropLast(cons(x, null)) -> null
dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys)))
POL(MAP(x1, x2)) = x1 + x2 POL(dropLast(x1)) = x1 POL(cons(x1, x2)) = x1 + x2 POL(null) = 0 POL(IF(x1, x2, x3)) = x1 + x2 + x3 POL(IF2(x1, x2)) = x1 + x2
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
...
→DP Problem 13
↳Modular Removal of Rules
MAP(f, cons(x', xs'')) -> IF(null, f, cons(x', xs''))
IF2(f, cons(x', cons(y', ys'))) -> MAP(f, cons(x', dropLast(cons(y', ys'))))
IF(null, f, xs) -> IF2(f, xs)
dropLast(cons(x, null)) -> null
dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys)))
innermost
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
dropLast(cons(x, null)) -> null
dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys)))
POL(MAP(x1, x2)) = x1 + x2 POL(dropLast(x1)) = x1 POL(cons(x1, x2)) = 1 + x1 + x2 POL(null) = 0 POL(IF(x1, x2, x3)) = x1 + x2 + x3 POL(IF2(x1, x2)) = x1 + x2
dropLast(cons(x, null)) -> null
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
...
→DP Problem 14
↳Instantiation Transformation
MAP(f, cons(x', xs'')) -> IF(null, f, cons(x', xs''))
IF2(f, cons(x', cons(y', ys'))) -> MAP(f, cons(x', dropLast(cons(y', ys'))))
IF(null, f, xs) -> IF2(f, xs)
dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys)))
innermost
one new Dependency Pair is created:
IF(null, f, xs) -> IF2(f, xs)
IF(null, f'', cons(x''', xs'''')) -> IF2(f'', cons(x''', xs''''))
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
...
→DP Problem 15
↳Negative Polynomial Order
IF2(f, cons(x', cons(y', ys'))) -> MAP(f, cons(x', dropLast(cons(y', ys'))))
IF(null, f'', cons(x''', xs'''')) -> IF2(f'', cons(x''', xs''''))
MAP(f, cons(x', xs'')) -> IF(null, f, cons(x', xs''))
dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys)))
innermost
IF2(f, cons(x', cons(y', ys'))) -> MAP(f, cons(x', dropLast(cons(y', ys'))))
dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys)))
POL( IF2(x1, x2) ) = max{0, x2 - 1}
POL( cons(x1, x2) ) = x2 + 1
POL( MAP(x1, x2) ) = max{0, x2 - 1}
POL( dropLast(x1) ) = max{0, x1 - 1}
POL( IF(x1, ..., x3) ) = max{0, x3 - 1}
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
→DP Problem 2
↳UsableRules
→DP Problem 3
↳UsableRules
...
→DP Problem 16
↳Dependency Graph
IF(null, f'', cons(x''', xs'''')) -> IF2(f'', cons(x''', xs''''))
MAP(f, cons(x', xs'')) -> IF(null, f, cons(x', xs''))
dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys)))
innermost