Agda-stdlib: Misnomer: `Relation.Binary.Core.Total`

Created on 5 Sep 2018  ·  5Comments  ·  Source: agda/agda-stdlib

I find that the current Total for binary relations is a misnomer: Currently there is:

Total : ∀ {a ℓ} {A : Set a} → Rel A ℓ → Set _
Total _∼_ = ∀ x y → (x ∼ y) ⊎ (y ∼ x)

But a binary relation R is normally called total iff Reflexive (R relCompose (converse R)),
so ripping this name out of the context of a poor naming of linear orders is, in my opinion, very unfortunate.

library-design naming question

All 5 comments

Aren't they the same relation though? I do see this definition in other reference: https://ncatlab.org/nlab/show/total+relation

@HuStmpHrrr , ncatlab is a somewhat surprising source for relation-algebraic terminology.
A more common starting point, which I am also using in RATH-Agda, is the following textbook:

@Book{Schmidt-Stroehlein-1993,
  author = {Gunther Schmidt and Thomas Str{\"o}hlein},
  title = {Relations and Graphs, Discrete Mathematics for Computer Scientists},
  year = 1993,
  series = {EATCS-Mono\-graphs on Theoret.\null{} Comput.\null{} Sci.},
  publisher = Springer,
  DOI = {10.1007/978-3-642-77968-8},
  abstract = {Relational methods can be found at various places in
               computer science, notably in data base theory,
               relational semantics of concurrency, relational type
               theory, analysis of rewriting systems, and modern
               programming language design. In addition, they appear in
               algorithms analysis and in the bulk of discrete
               mathematics taught to computer scientists. This book
               devoted to the background of these methods. It is the
               first to explain how to use relational and graph-
               theoretic methods systematically in computer science.
               The powerful calculus of relation algebra is developed
               with respect to applications to a diverse range of
               problem areas. Results are first motivated by practical
               examples, often visualized by both Boolean 0-1-matrices
               and graphs, and then derived algebraically.}
  ISBN = {3-540-56254-0, 0-387-56254-0}
}

Hypothetically what would you suggest as a replacement name?

Unfortunately this can't be deprecated and is a reasonably large breaking change as it would require renaming the record field in TotalOrder.

Wikipedia uses connex for that particular relational property.

@MatthewDaggitt, you could choose to not change that field name, arguing that some people use the name “total” for this property in the order context.

(However, I still much prefer “linear order” over “total order”, but I admit that “linear” does not stand alone much better than “total”...)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mechvel picture mechvel  ·  7Comments

langston-barrett picture langston-barrett  ·  7Comments

JacquesCarette picture JacquesCarette  ·  7Comments

MatthewDaggitt picture MatthewDaggitt  ·  5Comments

MatthewDaggitt picture MatthewDaggitt  ·  8Comments