Skip to content

Non-associative number types #594

Open
@sethaxen

Description

@sethaxen

I was recently reminded that some number types are not even associative under multiplication, e.g. Quaternions.Octonion. So fixes like #504, #540, which would support numbers that don't commute under multiplication, like quaternions, would still do the wrong thing for octonions. On the other hand, there are number types like Unitful.Quantity, which are Numbers, for which we want our rules to work.

So I see 2 ways forward:

  1. Implement only rules that make no additional assumptions about the properties of the numbers beyond the primal, and only in cases where the primal is define in base.
  2. Try to implement rules generically, but assume that numbers that violate basic properties like associativity are rare and require (and document) that devs of packages with such numbers need to opt out of these rules for compatibility with ChainRules-compatible ADs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-careful-thoughtA reminder that this thing is not obviouis and care must be taken when working on it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions