Term Rewriting System R:
[x, y, h, i, u, v]
app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(eq, app(s, x)), app(s, y)) -> APP(eq, x)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(app(edge, x), y), app(app(union, i), h))
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(union, i)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(ifreach1, app(app(eq, x), u))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(eq, x)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach2, app(app(eq, y), v)), x)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(ifreach2, app(app(eq, y), v))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(eq, y)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, x), y), i)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(reach, x)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(edge, u), v), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(or, app(app(app(app(reach, x), y), i), h))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, x), y), i)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(reach, x)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, v), y), app(app(union, i), h)), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, v), y), app(app(union, i), h))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, v), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(reach, v)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(union, i)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, v), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, v), y), app(app(union, i), h))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, v), y), app(app(union, i), h)), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, x), y), i)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(edge, u), v), h)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, x), y), i)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach2, app(app(eq, y), v)), x)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(app(edge, x), y), app(app(union, i), h))
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(app(edge, x), y), app(app(union, i), h))
two new Dependency Pairs are created:

APP(app(union, app(app(app(edge, x), y), empty)), h'') -> APP(app(app(edge, x), y), h'')
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Narrowing Transformation


Dependency Pairs:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(union, app(app(app(edge, x), y), empty)), h'') -> APP(app(app(edge, x), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, v), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, v), y), app(app(union, i), h))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, v), y), app(app(union, i), h)), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, x), y), i)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(edge, u), v), h)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, x), y), i)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach2, app(app(eq, y), v)), x)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach2, app(app(eq, y), v)), x)
four new Dependency Pairs are created:

APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, true), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), app(s, x'')), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 3
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), app(s, x'')), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), empty)), h'') -> APP(app(app(edge, x), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, v), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, v), y), app(app(union, i), h))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, v), y), app(app(union, i), h)), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, x), y), i)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(edge, u), v), h)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, x), y), i)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, x), y), i)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 4
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), app(s, x'')), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(union, app(app(app(edge, x), y), empty)), h'') -> APP(app(app(edge, x), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, v), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, v), y), app(app(union, i), h))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, v), y), app(app(union, i), h)), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, x), y), i)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(edge, u), v), h)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 5
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), app(s, x'')), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(union, app(app(app(edge, x), y), empty)), h'') -> APP(app(app(edge, x), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, v), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, v), y), app(app(union, i), h))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, v), y), app(app(union, i), h)), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, x), y), i)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(edge, u), v), h)
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(edge, u), v), h)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 6
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), app(s, x'')), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(union, app(app(app(edge, x), y), empty)), h'') -> APP(app(app(edge, x), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, v), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, v), y), app(app(union, i), h))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, v), y), app(app(union, i), h)), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, x), y), i)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, x), y), i)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 7
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), app(s, x'')), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(union, app(app(app(edge, x), y), empty)), h'') -> APP(app(app(edge, x), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, v), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, v), y), app(app(union, i), h))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, v), y), app(app(union, i), h)), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, x), y)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 8
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), app(s, x'')), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(union, app(app(app(edge, x), y), empty)), h'') -> APP(app(app(edge, x), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, v), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, v), y), app(app(union, i), h))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, v), y), app(app(union, i), h)), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, v), y), app(app(union, i), h)), empty)
two new Dependency Pairs are created:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 9
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), app(s, x'')), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(union, app(app(app(edge, x), y), empty)), h'') -> APP(app(app(edge, x), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, v), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, v), y), app(app(union, i), h))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(reach, v), y), app(app(union, i), h))
two new Dependency Pairs are created:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(reach, v), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 10
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(reach, v), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), app(s, x'')), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(union, app(app(app(edge, x), y), empty)), h'') -> APP(app(app(edge, x), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, v), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(reach, v), y)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 11
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(reach, v), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), app(s, x'')), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(union, app(app(app(edge, x), y), empty)), h'') -> APP(app(app(edge, x), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(union, app(app(app(edge, x), y), empty)), h'') -> APP(app(app(edge, x), y), h'')
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 12
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), app(s, x'')), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(reach, v), y), h'')


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
two new Dependency Pairs are created:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), h'''))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 13
Narrowing Transformation


Dependency Pairs:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), h'''))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(reach, v), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), app(s, x'')), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, true), x)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, true), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 14
Narrowing Transformation


Dependency Pairs:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), h'''))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(reach, v), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), app(s, x'')), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), 0), app(app(app(edge, u), app(s, x'')), i)), h) -> APP(app(ifreach2, false), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 15
Narrowing Transformation


Dependency Pairs:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(reach, v), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), h'''))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), 0), i)), h) -> APP(app(ifreach2, false), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 16
Narrowing Transformation


Dependency Pairs:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), h'''))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(reach, v), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, x'')), app(app(app(edge, u), app(s, y'')), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
four new Dependency Pairs are created:

APP(app(app(app(app(ifreach1, true), x), app(s, 0)), app(app(app(edge, u), app(s, 0)), i)), h) -> APP(app(ifreach2, true), x)
APP(app(app(app(app(ifreach1, true), x), app(s, 0)), app(app(app(edge, u), app(s, app(s, x'''))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, 0)), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, app(s, y'))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 17
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, app(s, y'))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, 0)), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, 0)), app(app(app(edge, u), app(s, app(s, x'''))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, 0)), app(app(app(edge, u), app(s, 0)), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(reach, v), y), h'')
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), h'''))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(reach, v), y), h'')
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 18
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, 0)), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, 0)), app(app(app(edge, u), app(s, app(s, x'''))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, 0)), app(app(app(edge, u), app(s, 0)), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), h'''))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, app(s, y'))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h'')))
two new Dependency Pairs are created:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), h'''))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 19
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), h'''))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, app(s, y'))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, 0)), app(app(app(edge, u), app(s, app(s, x'''))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, 0)), app(app(app(edge, u), app(s, 0)), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), h'''))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, 0)), i)), h) -> APP(app(ifreach2, false), x)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), h'''))
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 20
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), h'''))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, app(s, y'))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, 0)), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, 0)), app(app(app(edge, u), app(s, app(s, x'''))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, 0)), app(app(app(edge, u), app(s, 0)), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, 0)), app(app(app(edge, u), app(s, 0)), i)), h) -> APP(app(ifreach2, true), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 21
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, app(s, y'))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, 0)), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, 0)), app(app(app(edge, u), app(s, app(s, x'''))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), h'''))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, 0)), app(app(app(edge, u), app(s, app(s, x'''))), i)), h) -> APP(app(ifreach2, false), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 22
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), h'''))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, app(s, y'))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, 0)), i)), h) -> APP(app(ifreach2, false), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, 0)), i)), h) -> APP(app(ifreach2, false), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 23
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, app(s, y'))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), h'''))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), empty))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), h'''))
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 24
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, app(s, y'))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
two new Dependency Pairs are created:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), empty)))), h'''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), h'''')))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 25
Narrowing Transformation


Dependency Pairs:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), empty)))), h'''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), h'''')))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, app(s, y'))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, x'''))), app(app(app(edge, u), app(s, app(s, y'))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
four new Dependency Pairs are created:

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, 0))), app(app(app(edge, u), app(s, app(s, 0))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, 0))), app(app(app(edge, u), app(s, app(s, app(s, x'')))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, 0))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, app(s, y'')))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 26
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, app(s, y'')))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, 0))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, 0))), app(app(app(edge, u), app(s, app(s, app(s, x'')))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, 0))), app(app(app(edge, u), app(s, app(s, 0))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), empty)))), h'''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), h'''')))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), i')))), h''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(union, i'), h'''))))
two new Dependency Pairs are created:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), empty)))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), h'''')))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 27
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), empty)))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), h'''')))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, 0))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, 0))), app(app(app(edge, u), app(s, app(s, app(s, x'')))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, 0))), app(app(app(edge, u), app(s, app(s, 0))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), empty)))), h'''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), h'''')))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, app(s, y'')))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), empty)))), h'''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), h'''')))
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 28
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), empty)))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), h'''')))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, app(s, y'')))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, 0))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, 0))), app(app(app(edge, u), app(s, app(s, app(s, x'')))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, 0))), app(app(app(edge, u), app(s, app(s, 0))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))
two new Dependency Pairs are created:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 29
Narrowing Transformation


Dependency Pairs:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, app(s, y'')))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, 0))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, 0))), app(app(app(edge, u), app(s, app(s, app(s, x'')))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, 0))), app(app(app(edge, u), app(s, app(s, 0))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), empty)))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), h'''')))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, 0))), app(app(app(edge, u), app(s, app(s, 0))), i)), h) -> APP(app(ifreach2, true), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 30
Narrowing Transformation


Dependency Pairs:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), empty)))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), h'''')))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, app(s, y'')))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, 0))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, 0))), app(app(app(edge, u), app(s, app(s, app(s, x'')))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, 0))), app(app(app(edge, u), app(s, app(s, app(s, x'')))), i)), h) -> APP(app(ifreach2, false), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 31
Narrowing Transformation


Dependency Pairs:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), empty)))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), h'''')))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, app(s, y'')))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, 0))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, 0))), i)), h) -> APP(app(ifreach2, false), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 32
Narrowing Transformation


Dependency Pairs:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), empty)))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), h'''')))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, app(s, y'')))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, x'')))), app(app(app(edge, u), app(s, app(s, app(s, y'')))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
four new Dependency Pairs are created:

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, app(s, x'''))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, y'))))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 33
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, y'))))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, app(s, x'''))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), empty)))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), h'''')))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), empty)))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), h'''')))
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 34
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, app(s, x'''))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, y'))))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), i''))))), h'''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(union, i''), h'''')))))
two new Dependency Pairs are created:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 35
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, y'))))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, app(s, x'''))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, false), x)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 36
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, y'))))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, app(s, x'''))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
two new Dependency Pairs are created:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 37
Narrowing Transformation


Dependency Pairs:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, y'))))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, app(s, x'''))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, true), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 38
Narrowing Transformation


Dependency Pairs:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, y'))))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, app(s, x'''))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, 0)))), app(app(app(edge, u), app(s, app(s, app(s, app(s, x'''))))), i)), h) -> APP(app(ifreach2, false), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 39
Narrowing Transformation


Dependency Pairs:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, y'))))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, 0)))), i)), h) -> APP(app(ifreach2, false), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 40
Narrowing Transformation


Dependency Pairs:

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, y'))))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, x'''))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, y'))))), i)), h) -> APP(app(ifreach2, app(app(eq, x'''), y')), x)
four new Dependency Pairs are created:

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, 0))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, 0))))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, 0))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, x'')))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, 0))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, y'')))))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 41
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, y'')))))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, 0))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, 0))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, x'')))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, 0))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, 0))))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), empty))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), h'''''))))
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 42
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, 0))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, 0))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, x'')))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, 0))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, 0))))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, y'')))))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), i')))))), h''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(union, i'), h'''''))))))
two new Dependency Pairs are created:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 43
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, y'')))))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, 0))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, x'')))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, 0))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, 0))))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, 0))))), i)), h) -> APP(app(ifreach2, false), x)


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 44
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, y'')))))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, 0))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, 0))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, x'')))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, 0))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, 0))))), i)), h) -> APP(app(ifreach2, true), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, 0))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, 0))))), i)), h) -> APP(app(ifreach2, true), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 45
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, y'')))))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, 0))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, 0))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, x'')))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, 0))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, x'')))))), i)), h) -> APP(app(ifreach2, false), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 46
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, y'')))))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, 0))))), i)), h) -> APP(app(ifreach2, false), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, 0))))), i)), h) -> APP(app(ifreach2, false), x)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 47
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))
APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, y'')))))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), empty)))))), h'''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), h'''''')))))
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 48
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

APP(app(app(app(app(ifreach1, true), x), app(s, app(s, app(s, app(s, app(s, x'')))))), app(app(app(edge, u), app(s, app(s, app(s, app(s, app(s, y'')))))), i)), h) -> APP(app(ifreach2, app(app(eq, x''), y'')), x)
APP(app(union, app(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(edge, x), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), i''))), h'') -> APP(app(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(union, i''), h''))), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), empty)), h'') -> APP(app(app(app(reach, v), y), h''), empty)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(union, i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), h)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))
APP(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, y), v)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach2, app(app(eq, y), v)), x), y)
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(eq, x), u)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(ifreach1, app(app(eq, x), u)), x)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(ifreach1, app(app(eq, x), u)), x), y)
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i))
APP(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> APP(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
APP(app(union, app(app(app(edge, x), y), i)), h) -> APP(app(union, i), h)
APP(app(eq, app(s, x)), app(s, y)) -> APP(app(eq, x), y)
APP(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), i''))))))), h'''''') -> APP(app(app(reach, v), y), app(app(app(edge, x''), y''), app(app(app(edge, x'''), y'''), app(app(app(edge, x'0), y'0), app(app(app(edge, x'1), y'1), app(app(app(edge, x'2), y'2), app(app(union, i''), h'''''')))))))


Rules:


app(app(eq, 0), 0) -> true
app(app(eq, 0), app(s, x)) -> false
app(app(eq, app(s, x)), 0) -> false
app(app(eq, app(s, x)), app(s, y)) -> app(app(eq, x), y)
app(app(or, true), y) -> true
app(app(or, false), y) -> y
app(app(union, empty), h) -> h
app(app(union, app(app(app(edge, x), y), i)), h) -> app(app(app(edge, x), y), app(app(union, i), h))
app(app(app(app(reach, x), y), empty), h) -> false
app(app(app(app(reach, x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach1, app(app(eq, x), u)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, true), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(app(ifreach2, app(app(eq, y), v)), x), y), app(app(app(edge, u), v), i)), h)
app(app(app(app(app(ifreach1, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(app(app(reach, x), y), i), app(app(app(edge, u), v), h))
app(app(app(app(app(ifreach2, true), x), y), app(app(app(edge, u), v), i)), h) -> true
app(app(app(app(app(ifreach2, false), x), y), app(app(app(edge, u), v), i)), h) -> app(app(or, app(app(app(app(reach, x), y), i), h)), app(app(app(app(reach, v), y), app(app(union, i), h)), empty))




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