Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complexes package doesn't work with plain matrices #3640

Open
mahrud opened this issue Feb 5, 2025 · 0 comments
Open

Complexes package doesn't work with plain matrices #3640

mahrud opened this issue Feb 5, 2025 · 0 comments

Comments

@mahrud
Copy link
Member

mahrud commented Feb 5, 2025

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

@mahrud mahrud changed the title Complexes doesn't work with plain matrices Complexes package doesn't work with plain matrices Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant