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

Added deprecation warning for Matrix \\ Matrix #3222

Merged
merged 5 commits into from
May 10, 2024

Conversation

mahrud
Copy link
Member

@mahrud mahrud commented May 10, 2024

This PR is in preparation for a PR in the next release which will change g \\ f to call quotient'(f, g) instead of being a synonym for f // g = quotient(f, g), and which will add a new algorithm that works for arbitrary modules rather than only free modules, as well as maps of coherent sheaves. This change was suggested in #1448 during work on PrimaryDecompositions with @mikestillman, and recently came up again during work on Varieties with @ggsmith and others.

Here is the warning:

i1 : M = ZZ^3;

i2 : id_M \\ id_M
 -- Note: 'm \\ n' is deprecated; use 'n // m' instead.

o2 = | 1 0 0 |
     | 0 1 0 |
     | 0 0 1 |

              3       3
o2 : Matrix ZZ  <-- ZZ

Note that the current algorithm for quotient' is even more limited than quotient, because dual doesn't work for maps between non-free modules:

i1 : M = coker(5 * id_(ZZ^2));

i2 : f = map(M, M, {{1,2},{3,4}});

o2 : Matrix M <-- M

i3 : g = map(M, M, {{2,3},{4,0}});

o3 : Matrix M <-- M

i4 : quotient(f * g, f)

o4 = | 2  -2 |
     | -1 0  |

o4 : Matrix M <-- M

i5 : quotient'(f * g, g)
stdio:5:1:(3): error: expected maps between free modules

Lack of good notation and hard to find documentation has lead to people resorting to code such as this:

-- it is necessary to transpose because we need a left factorization
-- but M2's command // always produces a right factorization
transpose(transpose(C.dd_(i+1))\\transpose(sub(C.dd_(i+1),gInv)*g0))

Other change:

  • added deprecation warning for Matrix \ Matrix
  • removed Matrix \ Matrix from documentation
  • removed Matrix \ Matrix from BettiCharacters
  • added List*Thing, replaced List/Thing
  • fixed an incorrect test in Quasidegrees

@DanGrayson DanGrayson merged commit 4b03740 into Macaulay2:development May 10, 2024
6 checks passed
@mahrud mahrud deleted the feature/left-quotient branch May 10, 2024 18:28
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

Successfully merging this pull request may close these issues.

2 participants