ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 01 Dec 2012 18:37:19 +0100non-commutative algebra with formal functionshttps://ask.sagemath.org/question/9595/non-commutative-algebra-with-formal-functions/I'd like to look at the following: the set of formal functions with 2 variables f(x,y) and the real numbers a,b,c..., including an addition and a non-commutative multiplication, such that things like
expand((a+f(x,y))*(b+c*f(u,v))) = a*b + a*c*f(u,v) + b*f(x,y) + c*f(x,y)*f(u,v)
are possible (and vice versa), and with the multiplication of the functions
f(x,y)*f(u,v) != f(u,v)*f(x,y)
being non-commutative, however with the multiplication of the functions by the real scalars
a*f(x,y) == f(x,y)*a
still commutative. Can I construct something like that with sage?
MarkSat, 01 Dec 2012 18:37:19 +0100https://ask.sagemath.org/question/9595/Quotienting a ring of integershttps://ask.sagemath.org/question/9556/quotienting-a-ring-of-integers/I was trying to play within the ring of integers of a number field, when I decided to quotient by an ideal. It raised an "IndexError: the number of names must equal the number of generators" exception, which was quite unexpected ; here is an example:
K=NumberField(x**2+1,x)
O=K.ring_of_integers()
O.quo(O.ideal(3))
as you see, I'm using the same ring to define the ideal I want to quotient with, so there is mathematically no problem... so I think either I found a bug or something needs to be documented better. How does one work in a quotient of a ring of integers?SnarkThu, 22 Nov 2012 01:52:30 +0100https://ask.sagemath.org/question/9556/Partial Algebrashttps://ask.sagemath.org/question/8022/partial-algebras/Hi!
As part of a future package for matroid theory, I would like to implement an algebraic structure called a "partial field".
A partial field is a tuple P = (S, 0, 1, +, *) such that
1. S - {0} is a group G under * with identity 1
2. Every element p has an additive inverse q such that p + q = 0
3. Otherwise, the sum p + q is defined for only some choices of p + q.
Associativity of + is respected "as much as possible". Formally, this means that there exists a ring R such that G is contained in the group of units of R, and addition in the partial field is the restriction of addition in the ring to S.
Example: the regular partial field. This has elements {-1, 0, 1}, with addition and multiplication as in ZZ, but 1 + 1 is not defined.
How can we best implement such structures? That is, where should the category PartialFields go? One choice would be to subclass Rings. However, for various reasons it is desirable to return an "undefined_element" instead of the sum in the ring. This would break associativity tests that seem to be required for rings.
Example: take the partial field {(-1)^s 2^k : s,k in ZZ} U {0}, with usual multiplication and addition in QQ restricted to this set (e.g. 1/2 - 1 = -1/2 is ok, but 4 - 1/4 is undefined).
* (1 + 1) + (1 -2) = 1
* ((1 + 1) + 1) - 2 = undefined_element
If we do not subclass Ring, then a whole new can of worms is opened: we're no longer allowed to fill matrices with our elements. I'm not looking forward to re-implementing the Matrix class (though we would probably subclass it anyway as PMatrix, since we need a different determinant and rank algorithm, as well as some new methods).
P.S. How does one define ZZ[1/2] in Sage?
P.P.S. How would I coerce from my own, custom ring into QQ?
StefanFri, 25 Mar 2011 04:54:01 +0100https://ask.sagemath.org/question/8022/Ideal Radicals Question?https://ask.sagemath.org/question/7990/ideal-radicals-question/
Hello experts,
Given that there is a commutative ring R and 2 ideals I and J, also given that I is included in J
I need to prove
1) radical of I is in radical of J
2) radical of radical of ideal I = radical of ideal I.
Please give me a detailed answer, I need it urgently!!!!
Thanks in advance!SteveSat, 12 Mar 2011 10:07:19 +0100https://ask.sagemath.org/question/7990/