Ask Your Question

Jo Be's profile - activity

2020-04-23 12:46:08 -0500 received badge  Popular Question (source)
2018-02-22 08:40:37 -0500 received badge  Nice Question (source)
2018-02-22 06:41:31 -0500 answered a question Calculations in quotient of a free algebra

I know now that we can do the following:

sage: A = FreeAlgebra(QQbar, 3, "a")
sage: F = A.monoid()
sage: M = MatrixSpace(QQbar,4)
sage: x, y, xy = F.gens()
sage: mons = [F(1), x, y, xy]
sage: mats = [ 
....:        M([ 0, 1, 0, 0,   1, 0, 0, 0,   0, 0, 0, -1,   0, 0, -1, 0 ]),    
....:        M([ 0, 0, 1, 0,   0, 0, 0, 1,   0, 0, 0, 0,   0, 0, 0, 0]),    
....:        M([ 0, 0, 0, 1,   0, 0, 1, 0,   0, 0, 0, 0,   0, 0, 0, 0 ])
....: ]
sage: H.<x,y,xy> = FreeAlgebraQuotient(A,mons,mats); H
Free algebra quotient on 3 generators ('x', 'y', 'xy') and dimension 4 over Algebraic Field

And we can verify

sage: x^2
1
sage: y^2
0
sage: x*y
xy
sage: y*x
-xy

Note: We cannot take tensor products, but that is not what I originally asked for, so.

2018-02-21 09:37:03 -0500 commented answer Calculations in quotient of a free algebra

Thank you for adding the ticket!

2018-02-21 07:44:18 -0500 asked a question Calculations in quotient of a free algebra

I want to define (the algebra part of) Sweedler's four-dimensional Hopf algebra, which is freely generated by $x,y$ and subject to the relations $$ x^2 = 1, \qquad y^2 = 0, \qquad x\cdot y = - y\cdot x~ , $$ but I don't see how to do it.

I have tried the following:

sage: A.<x,y> = FreeAlgebra(QQbar)
sage: I = A*[x*x - 1, y*y, x*y + y*x]*A
sage: H.<x,y> = A.quo(I)
sage: H
Quotient of Free Algebra on 2 generators (x, y) over Algebraic Field by the ideal (-1 + x^2, y^2, x*y + y*x)

But then I get

sage: H.one() == H(x*x)
False

So is this currently possibly using a different method?

Thanks

2017-08-26 04:13:06 -0500 commented question Solving equations in polynomial ring if ideal is positive dimensional

Thank you, but unfortunately for the larger cases (the next system consists of 24 very long equations in 10 variables) this is not so easily done.

However, the last part in your second reply gave me an idea! Namely: Just don't solve for all variables, only for some and treat the rest as parameters.

I think I might be able to work with that, and from then on kind of 'see' solutions (I'm not necessarily interested in all solutions). Might work :)

2017-08-24 03:25:31 -0500 received badge  Editor (source)
2017-08-24 03:24:53 -0500 asked a question Solving equations in polynomial ring if ideal is positive dimensional

I will be outlining the situation, and at the bottom I will describe my actual `problems'.

I'm coming from this question, nbruin suggested I use polynomial rings. I'm afraid I'm missing something here. What I did was the following.

P.<a1,a2,b1,b2,q> = QQ[]

def eq(a,b,c,d):
    return q*(a**2 + b**2) + 2*(a*c + b*d)

I = ideal( eq(a1,a2,b1,b2), eq(b1,b2,a1,a2) )
B = I.groebner_basis()

Note that my equations are in fact only quadratic.

As I understand from the wiki page on systems of polynomial equations, we can already tell - by looking at the reduced Gröbner basis - whether solutions exist at all.

Sage computes the reduced Gröbner basis, so here is $B$:

a1^3*b1 + a1*a2^2*b1 - a1*b1^3 + a1^2*a2*b2 + a2^3*b2 - a2*b1^2*b2 - a1*b1*b2^2 - a2*b2^3, 
a1^2*q + a2^2*q + 2*a1*b1 + 2*a2*b2,
b1^2*q + b2^2*q + 2*a1*b1 + 2*a2*b2

So our system is not inconsistent, but unfortunately it is also not zero dimensional, which is why $\texttt{I.variety()}$ does not work.


My problems:

1.) $q$ is actually just a parameter in the underlying field, or rather in $\mathbb{R}$, that is: for given equations it is constant. But how do I use variables/constants in polynomial rings? I didn't find anything.

2.) In reality, I want to work over $\mathbb{R}$, but I read somewhere it is preferred to use $\texttt{QQ}$ or $\texttt{ZZ}$. Changing the base ring doesn't change the solvability tho (also not with $\texttt{QQbar}$)

3.) I know there are 4 one-parameter solutions for $\texttt{a1,a2,b1,b2}$. Is it possible to get sage to find an expression for them? ($\texttt{solve}$ finds them, but this is just a small example of much larger systems I want to solve)

2017-08-18 02:36:25 -0500 received badge  Scholar (source)
2017-08-15 08:12:04 -0500 received badge  Supporter (source)
2017-08-14 13:24:14 -0500 received badge  Student (source)
2017-08-14 12:49:39 -0500 asked a question Sage wrongly suggests there are only trivial solutions, why?

I have a system of two quadratic equations which I want to solve. WolframAlpha shows me whole families of solution, but sage says there are only trivial solutions. The equations are

\begin{align} d\cdot\lvert\alpha\rvert^2 + \alpha^* \beta + \alpha\beta^* ==&0, \end{align} \begin{align} d\cdot\lvert\beta\rvert^2 + \alpha^* \beta + \alpha\beta^* ==&0, \end{align} where $d$ is constant and I want to solve for the complex numbers $\alpha, beta$

I have the following minimal working example

var('a,b,q')
assume(a, 'complex')
assume(b, 'complex')
assume(q, 'real')

eq(x,y) = q*norm(x) + conjugate(x)*y + x*conjugate(y)

solution = solve([eq(a,b) == 0, eq(b,a) == 0], [a,b])
polySolution = solve([eq(a,b) == 0, eq(b,a) == 0], [a,b], to_poly_solve=True)

and the output then is

sage: solution
[[a == 0, b == 0]]
sage: polySolution
[[a == 0, b == 0]]

which is simply not correct.

Now, as I said, I have found solutions with WolframAlpha, but the next candidate I have to compute gives 18 equations in 5 complex variables, which I cannot possibly solve with WA. Sage, again, tells me that there are only trivial solutions, but because of this smaller example presented here, I believe that that is wrong.

Does anyone know how to force sage to give solutions?

2017-08-14 12:49:39 -0500 asked a question Sage wrongly says there are only trivial solutions

I have a system of two quadratic equations which I want to solve. WolframAlpha shows me whole families of solution, but sage says there are only trivial solutions. The equations are

\begin{align} d\cdot\lvert\alpha\rvert^2 + \alpha^* \beta + \alpha\beta^* ==&0, \end{align} \begin{align} d\cdot\lvert\beta\rvert^2 + \alpha^* \beta + \alpha\beta^* ==&0, \end{align} where $d$ is constant and I want to solve for the complex numbers $\alpha, beta$

I have the following minimal working example

var('a,b,q')
assume(a, 'complex')
assume(b, 'complex')
assume(q, 'real')

eq(x,y) = q*norm(x) + conjugate(x)*y + x*conjugate(y)

solution = solve([eq(a,b) == 0, eq(b,a) == 0], [a,b])
polySolution = solve([eq(a,b) == 0, eq(b,a) == 0], [a,b], to_poly_solve=True)

and the output then is

sage: solution
[[a == 0, b == 0]]
sage: polySolution
[[a == 0, b == 0]]

which is simply not correct.

Now, as I said, I have found solutions with WolframAlpha, but the next candidate I have to compute gives 18 equations in 5 complex variables, which I cannot possibly solve with WA. Sage, again, tells me that there are only trivial solutions, but because of this smaller example presented here, I believe that that is wrong.

Does anyone know how to force sage to give solutions?