Term Rewriting System R: [x] app(g, app(h, app(g, x))) -> app(g, x) app(g, app(g, x)) -> app(g, app(h, app(g, x))) app(h, app(h, x)) -> app(h, app(app(f, app(h, x)), x)) Termination of R to be shown. R contains the following Dependency Pairs: APP(h, app(h, x)) -> APP(h, app(app(f, app(h, x)), x)) APP(h, app(h, x)) -> APP(app(f, app(h, x)), x) APP(h, app(h, x)) -> APP(f, app(h, x)) APP(g, app(g, x)) -> APP(g, app(h, app(g, x))) APP(g, app(g, x)) -> APP(h, app(g, x)) Furthermore, R contains two SCCs. SCC1: APP(h, app(h, x)) -> APP(h, app(app(f, app(h, x)), x)) By using a polynomial ordering, at least one Dependency Pair of this SCC can be strictly oriented. Additionally, the following rules can be oriented: app(h, app(h, x)) -> app(h, app(app(f, app(h, x)), x)) app(g, app(g, x)) -> app(g, app(h, app(g, x))) app(g, app(h, app(g, x))) -> app(g, x) Used ordering: Polynomial ordering with Polynomial interpretation: POL(g) = 0 POL(APP(x_1, x_2)) = x_2 POL(h) = 1 POL(f) = 0 POL(app(x_1, x_2)) = x_1 resulting in no subcycles. SCC2: APP(g, app(g, x)) -> APP(g, app(h, app(g, x))) By using a polynomial ordering, at least one Dependency Pair of this SCC can be strictly oriented. Additionally, the following rules can be oriented: app(h, app(h, x)) -> app(h, app(app(f, app(h, x)), x)) app(g, app(g, x)) -> app(g, app(h, app(g, x))) app(g, app(h, app(g, x))) -> app(g, x) Used ordering: Polynomial ordering with Polynomial interpretation: POL(g) = 1 POL(APP(x_1, x_2)) = x_2 POL(h) = 0 POL(f) = 0 POL(app(x_1, x_2)) = x_1 resulting in no subcycles. Termination of R successfully shown. Duration: 0.604 seconds.