Closed saliola closed 5 years ago
Changed dependencies from 28571, 28074 to #28571, #28074
Branch pushed to git repo; I updated commit sha1. New commits:
6a537c8 | 28572: fix conversion of quotient rings from Macaulay2 to Sage |
Branch pushed to git repo; I updated commit sha1. New commits:
d1566e5 | correct inaccuracy in doctest description |
Branch pushed to git repo; I updated commit sha1. New commits:
bd06a80 | properly handle conversion of quotient ring elements & inherit variable names when converting from M2 quotient rings |
Description changed:
---
+++
@@ -19,3 +19,32 @@
sage: macaulay2(ideal(5))
+
+Note that quotient rings in M2 inherit variable names from the ambient ring, so we mimic this behaviour in Sage::
+
+ +sage: R = macaulay2("ZZ/7[x,y]") +sage: I = macaulay2("ideal (x^3 - y^2)") +sage: (R/I).gens() +{x, y} +sage: (R/I).sage().gens() +(x, y) +
+
+We also implement conversion of polynomials from quotient rings from/to M2:
+
+```
+sage: x, y = (R/I).gens()
+sage: f = (x^3 + 2y^2x)^7; f
Branch pushed to git repo; I updated commit sha1. New commits:
ec1773e | disable caching of M2 conversion of polynomials in quotient rings (change _macaulay2_init_ to _macaulay2_) |
Branch pushed to git repo; I updated commit sha1. New commits:
25afa2f | simplify doctest |
Branch pushed to git repo; I updated commit sha1. New commits:
19d9995 | 28572: remove unnecessary doctests |
The following does not work yet (not even with #28574):
sage: R = QQ['x,y'].quotient('x^2-y')['z,t']
sage: f = R.base_ring()('x')^2 - R('z^2')
sage: macaulay2(f) # fails
This fails because the variable names in the quotient ring are named xbar,ybar
in Sage, but x,y
in Macaulay2. The conversion routine for polynomials does not currently take this into account when the base ring is a quotient ring.
Other than that, everything looks good to me up until here.
Changed dependencies from #28571, #28074 to #28567, #28571, #28074
Branch pushed to git repo; I updated commit sha1. New commits:
0d90888 | f4 and mgb opts for M2 gb computations |
59b3215 | add documentation and minor fixes |
1ad24c3 | pass F4 and MGB to M2 as strings |
7038ba2 | 28567: run Macaulay2 f4 and mgb doctests over a finite field |
00c028f | 28567: add missing optional doctest flag |
15d35e3 | Merge remote-tracking branch 'origin/public/interfaces/m2/f4etc' into public/interfaces/m2/m2_quotient_rings |
I added a dependency to #28567 because this did not merge cleanly on top of it (and I merged it into this branch).
Ok.
Reviewer: Markus Wageringel
Merge conflict (please merge in next beta)
Changed dependencies from #28567, #28571, #28074 to #28567, #28571, #28074, #28591
rebased on top of the branch of #28591
Last 10 new commits:
e40eb60 | make tests more foolproof. |
61ca2db | conversion of quotient rings to macaulay2 & improvements to conversion of ideals |
84702b4 | 28572: fix conversion of quotient rings from Macaulay2 to Sage |
4db4a3c | mark m2 doctests as optional |
80b99b9 | add _macaulay2_init_ method to QuotientRingElement |
c185cff | correct inaccuracy in doctest description |
ca619b8 | properly handle conversion of quotient ring elements & inherit variable names when converting from M2 quotient rings |
3a0e906 | disable caching of M2 conversion of polynomials in quotient rings (change _macaulay2_init_ to _macaulay2_) |
117ab9f | simplify doctest |
3f4f6f5 | 28572: remove unnecessary doctests |
Changed branch from public/interfaces/m2/m2_quotient_rings to u/dimpase/interfaces/m2/m2_quotient_rings
Changed reviewer from Markus Wageringel to Markus Wageringel, Dima Pasechnik
Changed branch from u/dimpase/interfaces/m2/m2_quotient_rings to 3f4f6f5
Currently, conversion of quotient rings to M2 is not supported; we add this functionality:
This also improves the conversion of ideals by moving the
MPolynomialIdeal_macaulay2_repr._macaulay2_
toIdeal_generic._macaulay2_init_
; for example, the following now work but didn't before (see the doctests for examples):Note that quotient rings in M2 inherit variable names from the ambient ring, so we mimic this behaviour in Sage::
We also implement conversion of polynomials from quotient rings from/to M2:
Depends on #28567 Depends on #28571 Depends on #28074 Depends on #28591
CC: @dimpase @mwageringel @antonleykin
Component: interfaces: optional
Keywords: IMA Coding Sprint, macaulay2, interfaces
Author: Franco Saliola
Branch/Commit:
3f4f6f5
Reviewer: Markus Wageringel, Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/28572