/export/starexec/sandbox2/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/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 false : [] --> o filterhigh : [o * o] --> o filterlow : [o * o] --> o ge : [o * o] --> o if1 : [o * o * o * o] --> o if2 : [o * o * o * o] --> o last : [o] --> o nil : [] --> o qsort : [o] --> o s : [o] --> o true : [] --> o ys : [] --> o qsort(nil) => nil qsort(cons(X, Y)) => append(qsort(filterlow(last(cons(X, Y)), cons(X, Y))), cons(last(cons(X, Y)), qsort(filterhigh(last(cons(X, Y)), cons(X, Y))))) filterlow(X, nil) => nil filterlow(X, cons(Y, Z)) => if1(ge(X, Y), X, Y, Z) if1(true, X, Y, Z) => filterlow(X, Z) if1(false, X, Y, Z) => cons(Y, filterlow(X, Z)) filterhigh(X, nil) => nil filterhigh(X, cons(Y, Z)) => if2(ge(Y, X), X, Y, Z) if2(true, X, Y, Z) => filterhigh(X, Z) if2(false, X, Y, Z) => cons(Y, filterhigh(X, Z)) ge(X, 0) => true ge(0, s(X)) => false ge(s(X), s(Y)) => ge(X, Y) append(nil, ys) => ys append(cons(X, Y), ys) => cons(X, append(Y, ys)) last(nil) => 0 last(cons(X, nil)) => X last(cons(X, cons(Y, Z))) => last(cons(Y, 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 : [] --> tg append : [sg * sg] --> sg cons : [tg * sg] --> sg false : [] --> hf filterhigh : [tg * sg] --> sg filterlow : [tg * sg] --> sg ge : [tg * tg] --> hf if1 : [hf * tg * tg * sg] --> sg if2 : [hf * tg * tg * sg] --> sg last : [sg] --> tg nil : [] --> sg qsort : [sg] --> sg s : [tg] --> tg true : [] --> hf ys : [] --> sg +++ 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.