-
Notifications
You must be signed in to change notification settings - Fork 256
Description
Okay, the AIM discussion on Monday and reviewing #1760 has crystallised something in my mind.
Relation.Binary
is fundamentally different from Relation.Unary
and Relation.Nullary
as it contains hierarchies for both equalities and orderings. I was reviewing #1760 and was about to suggest that we add a ton of more stuff to do with Galois connections under Relation.Binary
which seems totally the wrong place for it, but at the same time the only sensible place for it under the current structure.
Proposal: break out the two hierarchies in Relation.Binary
into new top-level modules Equality
and Order
respectively, to give them parity with Function
and Algebra
hierarchies. e.g. we would have (Order/Equality).(Definitions/Structures/Bundles)
.
Consequences
- to import
IsEquivalence
,Setoid
etc., you would useEquality
instead ofRelation.Binary
- to import
IsPreorder
,Preorder
,Poset
, etc. you would useOrder
instead ofRelation.Binary
- to import
_≡_
,refl
etc. you would useEquality.Propositional
instead ofRelation.Binary.PropositionalEquality
Advantages
- Makes it far easier for new users to find equality, arguably the first thing they need and look for.
- Typing
open import Relation.Binary.PropositionalEquality
in every module is frankly a pain in the neck.open import Equality.Propositional
is much shorter. - Order theory is a rich area, and this would provide a dedicated top-level folder for it.
- Separates out orderings from equality.
- Much lighter dependencies for equalities, as you are no longer forced to import a load of order theory as well.
Obviously we would maintain backwards compatibility for such a big change, by having the existing Relation.Binary(.Structures/Bundles)
re-export all the content of the new modules.
What are people's thoughts?