Skip to content

Complexes package doesn't work with plain matrices #3640

@mahrud

Description

@mahrud

The documentation for complex claims:

This constructor minimizes computation and does very little error checking. To verify that a complex is well constructed, use isWellDefined(Complex).

However, when defining a complex it seems the source and targets are held to a higher standard than chainComplex:

i1 : needsPackage "Complexes";

i2 : R = QQ[x,y];

i3 : complex { matrix {{x, y}}, matrix {{-y}, {x}} }
stdio:3:7:(3): error: map with index 2 has inconsistent target

i4 : chainComplex { matrix {{x, y}}, matrix {{-y}, {x}} }

      1      2      1
o4 = R  <-- R  <-- R

     0      1      2

o4 : ChainComplex

Is there a reason why the targets are not adjusted on the fly similar to chainComplex?

i5 : target o4.dd_2 === source o4.dd_1

o5 = true

cc: @mikestillman @ggsmith

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