Skip to content

UnboundedEnum #22

Closed
Closed
@jacereda

Description

@jacereda

The current Enum laws don't hold for BoundedEnum.

Shouldn't we have something like class Enum a <= UnboundedEnum a and move there the current Enum laws?

BoundedEnum would then be extended with

forall a > bottom, a < top: pred a < succ a
forall a > bottom, a < top: succ a > pred a
forall a > bottom: pred >=> succ >=> pred = pred
forall a < top: succ >=> pred >=> succ = succ

I don't know who could potentially want to implement UnboundedEnum though, maybe some bigint package? Would it be useful at all?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions