YES proof of /TPDB/Applicative_05_ReverseLastInit.ari # AProVE Commit ID: 23a904c96b029b0a549cde0d0d17dbccf967db59 jckassing 20260626 unpublished dirty Termination w.r.t. Q of the given QTRS could be proven: (0) QTRS (1) QTRSRRRProof [EQUIVALENT, 0 ms] (2) QTRS (3) QTRSRRRProof [EQUIVALENT, 0 ms] (4) QTRS (5) RisEmptyProof [EQUIVALENT, 0 ms] (6) YES ---------------------------------------- (0) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: app(app(app(compose, f), g), x) -> app(g, app(f, x)) app(reverse, l) -> app(app(reverse2, l), nil) app(app(reverse2, nil), l) -> l app(app(reverse2, app(app(cons, x), xs)), l) -> app(app(reverse2, xs), app(app(cons, x), l)) app(hd, app(app(cons, x), xs)) -> x app(tl, app(app(cons, x), xs)) -> xs last -> app(app(compose, hd), reverse) init -> app(app(compose, reverse), app(app(compose, tl), reverse)) Q is empty. ---------------------------------------- (1) QTRSRRRProof (EQUIVALENT) Used ordering: Polynomial interpretation [POLO]: POL(app(x_1, x_2)) = x_1 + x_2 POL(compose) = 0 POL(cons) = 0 POL(hd) = 1 POL(init) = 2 POL(last) = 2 POL(nil) = 0 POL(reverse) = 0 POL(reverse2) = 0 POL(tl) = 0 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: app(hd, app(app(cons, x), xs)) -> x last -> app(app(compose, hd), reverse) init -> app(app(compose, reverse), app(app(compose, tl), reverse)) ---------------------------------------- (2) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: app(app(app(compose, f), g), x) -> app(g, app(f, x)) app(reverse, l) -> app(app(reverse2, l), nil) app(app(reverse2, nil), l) -> l app(app(reverse2, app(app(cons, x), xs)), l) -> app(app(reverse2, xs), app(app(cons, x), l)) app(tl, app(app(cons, x), xs)) -> xs Q is empty. ---------------------------------------- (3) QTRSRRRProof (EQUIVALENT) Used ordering: Knuth-Bendix order [KBO] with precedence:tl > cons > nil > reverse2 > reverse > compose > app_2 and weight map: compose=1 reverse=4 reverse2=1 nil=2 cons=1 tl=1 app_2=0 The variable weight is 1With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: app(app(app(compose, f), g), x) -> app(g, app(f, x)) app(reverse, l) -> app(app(reverse2, l), nil) app(app(reverse2, nil), l) -> l app(app(reverse2, app(app(cons, x), xs)), l) -> app(app(reverse2, xs), app(app(cons, x), l)) app(tl, app(app(cons, x), xs)) -> xs ---------------------------------------- (4) Obligation: Q restricted rewrite system: R is empty. Q is empty. ---------------------------------------- (5) RisEmptyProof (EQUIVALENT) The TRS R is empty. Hence, termination is trivially proven. ---------------------------------------- (6) YES