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 use Equality instead of Relation.Binary
- to import
IsPreorder, Preorder, Poset, etc. you would use Order instead of Relation.Binary
- to import
_≡_, refl etc. you would use Equality.Propositional instead of Relation.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?
Okay, the AIM discussion on Monday and reviewing #1760 has crystallised something in my mind.
Relation.Binaryis fundamentally different fromRelation.UnaryandRelation.Nullaryas 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 underRelation.Binarywhich 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.Binaryinto new top-level modulesEqualityandOrderrespectively, to give them parity withFunctionandAlgebrahierarchies. e.g. we would have(Order/Equality).(Definitions/Structures/Bundles).Consequences
IsEquivalence,Setoidetc., you would useEqualityinstead ofRelation.BinaryIsPreorder,Preorder,Poset, etc. you would useOrderinstead ofRelation.Binary_≡_,refletc. you would useEquality.Propositionalinstead ofRelation.Binary.PropositionalEqualityAdvantages
open import Relation.Binary.PropositionalEqualityin every module is frankly a pain in the neck.open import Equality.Propositionalis much shorter.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?