Skip to content

Refactor Algebra.Consequences.*? #2502

Open
@jamesmckinna

Description

@jamesmckinna

These modules are structured around:

  • Base, depending only on the underlying Carrier set A, whose properties make explicit a dependency on a(n equality) relation _≈_ : Rel A ℓ;
  • Setoid, depending on a Setoid, giving rise to a relation as in Base, but with the IsEquivalence/Reasoning properties in scope;
  • Propositional, essential being Setoid instantiated to Relation.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 Bundled Setoids 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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions