-
Notifications
You must be signed in to change notification settings - Fork 252
Description
These modules are structured around:
Base
, depending only on the underlyingCarrier
setA
, whose properties make explicit a dependency on a(n equality) relation_≈_ : Rel A ℓ
;Setoid
, depending on aSetoid
, giving rise to a relation as inBase
, but with theIsEquivalence
/Reasoning
properties in scope;Propositional
, essential beingSetoid
instantiated toRelation.Binary.PropositionalEquality.Properties.setoid A
and are used in various places to augment the signature of both specific Algebra.Structures
(esp. IsGroup
, Is*Ring*
), and also various Algebra.Construct.*
.
@Taneb 's recent #2499 draws attention to the fact that this organisation privileges Bundle
d Setoid
s over their underlying Relation.Binary.Structures.IsEquivalence
fields... and thus violates the (implicit) dependency restriction of Structures
only on other Structures
, and not on Bundles
...
So: as a hypothetical-rewrite
or v3.0
refactoring, we should (perhaps!?) consider refactoring to ... sort this out. Discussion welcome!
UPDATED: similarly, the Relation.Binary.Reasoning
modules depend on the underlying Bundle
, and then delegate to the associated Structure
via imports of lower-level Single
and Double
modules... and hence impacts Algebra.Consequences
, via importing Relation.Binary.Reasoning.Setoid
etc. so to really unpick the dependencies might involve a larger scale refactoring?
Similarly, Algebra.Properties.*
depend on the associated Bundle
(which seems reasonable?), and drawing clear lines between Consequences
and Properties
seems to be a design choice for which... the issues aren't entirely clear?
Activity
jamesmckinna commentedon Nov 25, 2024
On further investigation:
Algebra.Structure.IsGroup.uniqueˡ-⁻¹
andAlgebra.Structure.IsGroup.uniqueʳ-⁻¹
, which depend onAlgebra.Consequences.Setoid
(and hence on a public export ofsetoid
), can de deprecated in favour ofAlgebra.Properties.Group.inverseˡ-unique
andAlgebra.Properties.Group.inverseʳ-unique
respectively, where theSetoid
sub-bundle is already in scope; (so: perhaps/probably should be?) see [ refactor ] deprecateAlgebra.Structures.IsGroup.{uniqueˡ-⁻¹|uniqueʳ-⁻¹}
with knock-ons forAlgebra.Module.*
#2571IsAbelianGroup
substructures inAlgebra.Module.Structures
, so presumably those re-exports can be handled by refactoring/reorganising in like fashion viaAlgebra.Module.Properties.*
?deprecated
definitions underAlgebra.Morphism
, specifically those which exhibit that it suffices to define aIsGroupHomomorphism
via a singleIsMonoidHomomorphism
field, because the inverse homomorphism property is admissible... which surely should either be refactored as aBiased
smart constructor, or else, now that homomorphisms are defined relative to the underlyingRaw
bundles... set aside entirely (cf. the discussion of admissible properties in Add bundled homomorphisms #2383 ...)Algebra.Module.Morphism.ModuleHomomorphism
, but in a context where the underlyingSetoid
/AbelianGroup
/...Bundles
are in scope, and hence can be delegated toAlgebra.Properties.Group
instead... I think. see above.So it looks as though the v1.5-and-after refactoring of
Algebra.Structures
andAlgebra.Bundles
still has some loose ends to tidy up. Sigh.MatthewDaggitt commentedon Dec 5, 2024
Yup all this analysis sounds sensible. When I first created the
Consequences
modules many years ago, I just needed a place to stuff this common stuff that didn't depend on the bundles in the hierarchy in question. I wasn't thinking about the long term design.jamesmckinna commentedon Dec 9, 2024
Badging this now as v3.0, as forming part of perhaps other, larger-scale
breaking
refactorings of the hierarchy.JacquesCarette commentedon Dec 10, 2024
It's rather fun to be seeing better design(s) emerge like this.
rawSetoid
manifest fields toAlgebra.Bundles.Raw
#2536jamesmckinna commentedon Jan 24, 2025
Work on #2563 suggests, at the very least, that these modules be refactored to change the (top-level) parameterisation of
Base
to include the equality relation, and to make the various implicit module parameters (arising from the contents ofRaw
signatures) globalvariable
s instead of their current, less robust/more fragile, forms... and that such a minimal intervention would not be breaking, so could be merged for v2.3... see #2572Algebra.Definitions.Integral
and its consequences #2563Function.Definitions
andFunction.Consequences
? #2565Algebra.Structures.IsGroup.{uniqueˡ-⁻¹|uniqueʳ-⁻¹}
with knock-ons forAlgebra.Module.*
#2571Function.*
hierarchy #25703 remaining items