M2
M2 copied to clipboard
The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
Unless this [test](https://github.com/Macaulay2/M2/blob/master/M2/Macaulay2/tests/normal/schenck-book-7.m2) was edited manually, I believe at some point `generateAssertions` supported multiline functions in its input, but now it is broken: ```m2 i1 : generateAssertions /// f =...
Remaining tasks from https://github.com/Macaulay2/M2/issues/3395#issuecomment-2277134043: 1. rename `Pseudocode -> PseudocodeBody`, add `Pseudocode` as common parent to parallel `Function/FunctionBody/FunctionClosure`. 2. combine `functionBody` and `symbolBody` and have it return the inner "body" of...
The code: ```m2 needsPackage "Complexes" R = QQ[x,y] C = complex R part(0, C) part(0, C[1] ++ C[-1]) ``` Outputs: ```m2 i4 : part(0, C) 1 o4 = QQ 0...
Here the determinant is instantaneously zero over the field or even the polynomial ring, but it never finishes over the quotient ring: ```m2 det matrix(ZZ/32003[x]/(x), {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,-2,0,0,-2,0,0,0,0,0,0,1,0,0,0,0,3,0,0},{0,0,2,0,0,-1,0,0,0,3,0,0,-1,0,-3, 0,0,1,0},{0,0,0,-2,0,0,1,1,0,0,3,0,0,0,0,0,0,0,3},{0,-1,0,0,3,0,0,0,3,0,0,2,0,3,0,0,3,0,0},{0,0,1,0,0,-1,0,0,0,0,0,0 ,-1,0,1,0,0,-1,0},{0,0,0,2,0,0,3,-1,0,0,1,0,0,0,0,3,0,0,1},{0,0,0,0,0,0,-1,0,0,0,-1,0,0,0,0,1,0,0,-1},{0,-2,0,0,-2,0, 0,0,0,0,0,1,0,0,0,0,3,0,0},{0,0,3,0,0,2,0,0,0,1,0,0,2,0,-1,0,0,-2,0},{0,0,0,2,0,0,3,-1,0,0,1,0,0,0,0,3,0,0,1},{0,-1,0 ,0,-2,0,0,0,1,0,0,1,0,1,0,0,2,0,0},{0,0,-1,0,0,0,0,0,0,-3,0,0,0,0,-3,0,0,-2,0},{0,0,0,0,2,0,0,0,-2,0,0,-1,0,-2,0,0,-1...
Persistent history in terminal sessions as well as vscode using readline now works (#2819, #3403), but there's a minor issue: exiting the terminal with Ctrl+D causes the last item stored...
Is this just the reality of how mpfr numbers work? ```m2 i1 : (1.2)_QQ 5404319552844595 o1 = ---------------- 4503599627370496 o1 : QQ i2 : (1.5)_QQ 3 o2 = - 2...
In the following example, I give two generating sets for the same module, and `pdim` gives a different answer for each. ``` i1 : R = QQ[x,y]; A = matrix...
This is happening on Debian 12.6: ```m2 $ cat usr-dist/common/share/doc/Macaulay2/ForeignFunctions/example-output/_foreign__Symbol.errors -- -*- M2-comint -*- hash: 2759357810293599536 i1 : mps = openSharedLibrary "mps" o1 = mps o1 : SharedLibrary i2 :...
For some reason the documentation for [RRi](https://macaulay2.com/doc/Macaulay2/share/doc/Macaulay2/Macaulay2Doc/html/___R__Ri.html) does _not_ mention or even list [left](https://macaulay2.com/doc/Macaulay2/share/doc/Macaulay2/Macaulay2Doc/html/_left.html) and [right](https://macaulay2.com/doc/Macaulay2/share/doc/Macaulay2/Macaulay2Doc/html/_right.html) in the "Methods that use a real interval" section. Same with midpoint. In fact,...
New package implementing a `Permutation` type by Sean Grate. Its intent is to have a standard and consistent type for permutations as more combinatorics-focused packages get added to Macaulay2. Much...