#๐Ÿ”’ Using the "solve" function in a field extension in SageMath

5 messages ยท Page 1 of 1 (latest)

crisp blade
#

Hello, this is my code :

K0.<j> = NumberField(x^2+x+1)
K1.<k> = K0.extension(2*x^2 + 3*x + 3)
var("a,b,c")
u = Matrix(1,3,[a,b,c]).transpose()

A2 = Matrix(3,3,[[1,0,0],[0,j,0],[0,0,j^2]])
A3 = Matrix(3,3,[[1,k*j,k*j^2],[k*j,j^2,k],[k*j^2,k,j]])```
And I would like this line of code :
```python
solve([(u.transpose()*A2*u)[0][0] == 0, (u.transpose()*A3*u)[0][0] == 0, a==1],[a,b,c])``` to work and give me the 4 solutions (I need to do that for a lot of pair of matrices). What should I do ? Thank you ^^
violet sentinelBOT
#

@crisp blade

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

native ore
#

ure likely to struggling maybe because solve is optimized for simpler fields or symbolic ring, not general number field extensions. what u should do here instead is consider using a PolynomialRing and reduce the problem to solving a zero-dimensional ideal, which you can do with grobner bases plus if u wish to yield solutions which are under C try using .roots() or numerical methods are good too.

violet sentinelBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.