#4539: plural wrapper
------------------------------------------------+---------------------------
Reporter: burcin | Owner:
OleksandrMotsak, AlexanderDreyer
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.7.2
Component: algebra | Keywords: libsingular
plural wrapper sd10 sd23.5 sd24 sd34
Work_issues: Pickling. Quotients. Uniqueness. | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies: #11068
#11316 #11856
------------------------------------------------+---------------------------
Changes (by SimonKing):
* work_issues: rebase wrt #11068; doc string formatting => Pickling.
Quotients. Uniqueness.
Comment:
Here's a report on features that I implemented today (not posted yet),
missing features, and I also have some questions for you:
__Sidedness of ideals__
By #11068, we can have one- and two-sided ideals. Oleksander told me that
Singular can only compute left or twosided Gröbner bases. Therefore, I
think non-commutative polynomial ideals should refuse to be right-sided.
The default should be left ideal. If the ideal is defined as a two-sided
ideal, then std should return the same as twostd. Here is an example:
{{{
sage: A.<x,y,z> = FreeAlgebra(QQ, 3)
sage: H = A.g_algebra({y*x:x*y-z, z*x:x*z+2*x, z*y:y*z-2*y})
sage: H.inject_variables()
Defining x, y, z
sage: JL = H.ideal([x^3, y^3, z^3 - 4*z])
sage: JL
Left Ideal (x^3, y^3, z^3 - 4*z) of Noncommutative Multivariate Polynomial
Ring in x, y, z over Rational Field, nc-relations: {y*x: x*y - z, z*y: y*z
- 2*y, z*x: x*z + 2*x}
sage: JL.std()
Left Ideal (z^3 - 4*z, y*z^2 - 2*y*z, x*z^2 + 2*x*z, 2*x*y*z - z^2 - 2*z,
y^3, x^3) of Noncommutative Multivariate Polynomial Ring in x, y, z over
Rational Field, nc-relations: {y*x: x*y - z, z*y: y*z - 2*y, z*x: x*z +
2*x}
sage: JT = H.ideal([x^3, y^3, z^3 - 4*z], side='twosided')
sage: JT
Twosided Ideal (x^3, y^3, z^3 - 4*z) of Noncommutative Multivariate
Polynomial Ring in x, y, z over Rational Field, nc-relations: {y*x: x*y -
z, z*y: y*z - 2*y, z*x: x*z + 2*x}
sage: JT.std()
Twosided Ideal (z^3 - 4*z, y*z^2 - 2*y*z, x*z^2 + 2*x*z, y^2*z - 2*y^2,
2*x*y*z - z^2 - 2*z, x^2*z + 2*x^2, y^3, x*y^2 - y*z, x^2*y - x*z - 2*x,
x^3) of Noncommutative Multivariate Polynomial Ring in x, y, z over
Rational Field, nc-relations: {y*x: x*y - z, z*y: y*z - 2*y, z*x: x*z +
2*x}
sage: JT.std() == JL.twostd()
True
}}}
I think that's a good solution.
__Cache__
I added a cached_method decorator to std and twostd - I guess it is
obvious that the result of a GB computation should be cached.
'''Question:''' Should g-algebras be unique parents? If you agree that
they should be, then I can try to implement it.
__Category__
A proper initialisation of non-commutative polynomial rings in the
category of algebras was missing and is now added:
{{{
sage: H._is_category_initialized()
True
sage: H.category()
Category of algebras over Rational Field
}}}
__Pickling__
The test suite does not pass. Among other things, pickling of g-algebras
has simply been forgotten. This certainly must be fixed:
{{{
sage: dumps(H)
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
...
TypeError: expected string or Unicode object, NoneType found
}}}
It could be that, by using a `UniqueFactory` or `UniqueRepresentation`,
the pickling problem automatically vanishes. Otherwise, a `__reduce__`
method must be implemented.
__Generator names for g-algebras__
It should be possible to choose names in the `g_algebra()` method.
__Quotients__
There is a custom `quotient()` method for g-algebras (not using #11068).
The question is: Is that really a quotient? It isn't printed as such, and
the quotient relations are not used in arithmetic nor in comparison:
{{{
sage: A.<x,y,z> = FreeAlgebra(QQ, 3)
sage: H = A.g_algebra({y*x:x*y-z, z*x:x*z+2*x, z*y:y*z-2*y})
sage: H.inject_variables()
Defining x, y, z
sage: I = H.ideal([y^2, x^2, z^2-H.one_element()],coerce=False)
sage: Q = H.quotient(I); Q
Noncommutative Multivariate Polynomial Ring in x, y, z over Rational
Field, nc-relations: {y*x: x*y - z, z*y: y*z - 2*y, z*x: x*z + 2*x}
sage: Q.relations()
{y*x: x*y - z, z*y: y*z - 2*y, z*x: x*z + 2*x}
sage: I.twostd()
Twosided Ideal (z^2 - 1, y*z - y, x*z + x, y^2, 2*x*y - z - 1, x^2) of
Noncommutative Multivariate Polynomial Ring in x, y, z over Rational
Field, nc-relations: {y*x: x*y - z, z*y: y*z - 2*y, z*x: x*z + 2*x}
sage: Q.2^2
z^2
sage: Q.2^2 == Q.one_element()
False
}}}
'''Question:''' Did I misinterprete it? Hence, is there a way to make Q
show that `Q.2^2` is equal to one?
Otherwise, the custom `quotient()` should be dropped. #11068 provides the
framework for nc-quotient rings; one just needs to add a `I.reduce(p)`
method to our ideals (which is missing anyway).
__Doc strings__
I fixed various wrong doc string formats. Of course, after the changes
mentioned above, some doc tests need to be modified.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4539#comment:74>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.