# On sorting non-ground terms and the standard order of terms

**URL:** <https://swi-prolog.discourse.group/t/on-sorting-non-ground-terms-and-the-standard-order-of-terms/1668>\
**Category:** General\
**Created:** [December 27, 2019, 11:57am UTC](https://swi-prolog.discourse.group/t/on-sorting-non-ground-terms-and-the-standard-order-of-terms/1668 "2019-12-27T11:57:23Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [December 30, 2019, 1:46pm UTC](https://swi-prolog.discourse.group/t/on-sorting-non-ground-terms-and-the-standard-order-of-terms/1668/15 "2019-12-30T13:46:54Z")

</div>

> [@stassa.p](#):
>
> I see you’re already down the rabbit hole having fun

I went down the rabbit hole way to long ago (decades), but it is definitely fun there.

> [@stassa.p](#):
>
> if I understand correctly you ended up reading about it after finding it in one of the references on my project’s GitHub

No, actually found it many years ago when trying to solve another problem. It is one of those things that once you learn about, you never forget.

> [@stassa.p](#):
>
> I consider this a good thing because it alleviates the burden on the user to provide a total ordering, plus ordering constraints, which I always felt is a lot to ask on top of providing background knowledge for every learning problem.

While I am familiar with proof systems (Coq), I have yet to actually work with them to a level I would like, but the concepts and burdens you noted are what keep me from adding them to my tool box because of the steep learning curve.

> [@stassa.p](#):
>
> then there’s a second decision that has to be made, in how to chose one of those “equal” terms for inclusion in the “set” resulting from the sorting of the list (as Boris and Peter pointed out).

Every time that part of the problem enters my mind, the [axiom of choice](https://en.wikipedia.org/wiki/Axiom_of_choice) comes to mind.

> [@stassa.p](#):
>
> I’m just very prone to being confused

Confusion is also my companion whom with serendipity will introduce me to ideas. So having one without the other makes life dull.

> [@stassa.p](#):
>
> Why are you not expecting an answer?

I didn’t know how far the cognitive distance was between Unification and Knuth-Bendix for your work, and if it was too great, an answer would have required more time than necessary.

It is like when I see some questions on StackOverflow and the OP needs a full class in programming just to explain _Hello, World!_; just not something I can devote the time to answer.

> [@stassa.p](#):
>
> Did I sound so mean in my earlier comments?

Not at all. It is actually nice to converse with other that know about areas I partially know about so that I can learn more.

---

_[View the full topic](https://swi-prolog.discourse.group/t/on-sorting-non-ground-terms-and-the-standard-order-of-terms/1668)._
