/export/starexec/sandbox/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- MAYBE We consider the system theBenchmark. We are asked to determine termination of the following first-order TRS. 0 : [] --> o append : [o * o] --> o cons : [o * o] --> o empty : [o] --> o eq : [o * o] --> o false : [] --> o head : [o] --> o if : [o * o * o * o] --> o if!6220min : [o * o] --> o if!6220replace : [o * o * o * o] --> o le : [o * o] --> o min : [o] --> o nil : [] --> o replace : [o * o * o] --> o s : [o] --> o sort : [o] --> o sortIter : [o * o] --> o tail : [o] --> o true : [] --> o eq(0, 0) => true eq(0, s(X)) => false eq(s(X), 0) => false eq(s(X), s(Y)) => eq(X, Y) le(0, X) => true le(s(X), 0) => false le(s(X), s(Y)) => le(X, Y) min(cons(X, nil)) => X min(cons(X, cons(Y, Z))) => if!6220min(le(X, Y), cons(X, cons(Y, Z))) if!6220min(true, cons(X, cons(Y, Z))) => min(cons(X, Z)) if!6220min(false, cons(X, cons(Y, Z))) => min(cons(Y, Z)) replace(X, Y, nil) => nil replace(X, Y, cons(Z, U)) => if!6220replace(eq(X, Z), X, Y, cons(Z, U)) if!6220replace(true, X, Y, cons(Z, U)) => cons(Y, U) if!6220replace(false, X, Y, cons(Z, U)) => cons(Z, replace(X, Y, U)) empty(nil) => true empty(cons(X, Y)) => false head(cons(X, Y)) => X tail(nil) => nil tail(cons(X, Y)) => Y sort(X) => sortIter(X, nil) sortIter(X, Y) => if(empty(X), X, Y, append(Y, cons(min(X), nil))) if(true, X, Y, Z) => Y if(false, X, Y, Z) => sortIter(replace(min(X), head(X), tail(X)), Z) As the system is orthogonal, it is terminating if it is innermost terminating by [Gra95]. Then, by [FuhGieParSchSwi11], it suffices to prove (innermost) termination of the typed system, with sort annotations chosen to respect the rules, as follows: 0 : [] --> vi append : [vi * vi] --> vi cons : [vi * vi] --> vi empty : [vi] --> oh eq : [vi * vi] --> oh false : [] --> oh head : [vi] --> vi if : [oh * vi * vi * vi] --> vi if!6220min : [oh * vi] --> vi if!6220replace : [oh * vi * vi * vi] --> vi le : [vi * vi] --> oh min : [vi] --> vi nil : [] --> vi replace : [vi * vi * vi] --> vi s : [vi] --> vi sort : [vi] --> vi sortIter : [vi * vi] --> vi tail : [vi] --> vi true : [] --> oh +++ Citations +++ [FuhGieParSchSwi11] C. Fuhs, J. Giesl, M. Parting, P. Schneider-Kamp, and S. Swiderski. Proving Termination by Dependency Pairs and Inductive Theorem Proving. In volume 47(2) of Journal of Automated Reasoning. 133--160, 2011. [Gra95] B. Gramlich. Abstract Relations Between Restricted Termination and Confluence Properties of Rewrite Systems. In volume 24(1-2) of Fundamentae Informaticae. 3--23, 1995.