bug in new version: random maps go in wrong direction

6 views
Skip to first unread message

David Eisenbud

unread,
May 17, 2025, 2:12:16 AMMay 17
to maca...@googlegroups.com
I installed, with Brew, the new version of M2, and found that one of my packages
wouldn't work. I think the direction of the morphism produced by
(random, Module, Module)
now goes the other way from what it did.
 Here's a snippet:
+ M2 --no-readline --print-width 112
Macaulay2, version 1.25.05
......
i22 : S = ZZ/101[t]
o22 = S
o22 : PolynomialRing
i23 : M = S^1/t
o23 = cokernel | t |
                                         1
o23 : S-module, quotient of S
i24 : random(M,S^1)
o24 = 0
                   1
o24 : Matrix S  <-- M
---
What it says in the
documentation:
  • Usage:
  • f = random(F, G)
  • Inputs:
    • F, a module,
    • G, a module,
    • .....
    • Outputs:
    • f, a matrix, a random, graded, degree 0 map

--
David Eisenbud
Professor of Mathematics
University of California Berkeley

Mahrud Sayrafi

unread,
May 17, 2025, 6:22:06 AMMay 17
to maca...@googlegroups.com
Ah, that's a bug that was introduced recently. Here is the workaround:

random' = (F, G) -> homomorphism random Hom(G, F, DegreeLimit => 0)
random'(S^1, M)

The bug was calling Hom(F, G) instead of Hom(G, F) ...
I just opened a pull request and requested a review from you here.

Mahrud



--
You received this message because you are subscribed to the Google Groups "Macaulay2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to macaulay2+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/macaulay2/CAFbL_pYdMBF4Y4HvaPTU1WzLURY2MrJJPQt6G%3DutvfJSUwUcsA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages