Skip to content

[ refactor ] Function.Definitions and Function.Consequences? #2565

Open
@jamesmckinna

Description

@jamesmckinna

Against #2514 , and continuing to think about #1436 etc., cf. #2318

I think that it might be more ergonomic to refactor Function.Definitions to separate out:

  • those Definitions parametrised on two equality relations, which would now become top-level module parameters
  • the Strictly* definitions, parametrised on a single equality relation, which I would move to a distinct new Function.Definitions.Strict module, again parametrised on the relation (and indeed, the relative importance of these definitions relative to the others has been discussed at length; it feels as though they are 'special', and not for 'everyday' use, except for the Propositional instantiation with _≡_ in Data.Nat.Properties etc.)
  • knock-on consequences: Function.Consequences and Algebra.Definitions, where in particular, one can immediately instantiate the two relations with the underlying equality of the Algebra (this would be the ergonomic payoff): eg. rephrasing the Cancellative properties in terms of Injective etc. cf. Refactor Algebra.Consequences.*? #2502

Draft PR in preparation.

Potentially breaking, so probably v3.0, but in terms of the overall structure/design of stdlib, I think the shift in parameterisation would be 'harmless', although it might go against the grain of the existing import/dependency structure of Function?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions