MAYBE Consider the applicative ATRS: |sort| ?f ?g nil -> nil |sort| ?f ?g (cons ?x ?y) -> insert ?f ?g (|sort| ?f ?g ?y) ?x insert ?f ?g nil ?y -> cons ?y nil insert ?f ?g (cons ?x ?z) ?y -> cons (?f ?x ?y) (insert ?f ?g ?z (?g ?x ?y)) max |0| ?y -> ?y max ?x |0| -> ?x max (s ?x) (s ?y) -> max ?x ?y min |0| ?y -> |0| min ?x |0| -> |0| min (s ?x) (s ?y) -> min ?x ?y asort ?z -> |sort| min max ?z dsort ?z -> |sort| max min ?z Failed to analyze termination.