Ask Your Question

petRUShka's profile - activity

2024-04-18 20:09:54 +0200 received badge  Notable Question (source)
2024-04-18 20:09:54 +0200 received badge  Popular Question (source)
2024-03-22 20:08:37 +0200 received badge  Notable Question (source)
2023-11-05 06:05:22 +0200 received badge  Famous Question (source)
2023-08-17 02:53:21 +0200 received badge  Famous Question (source)
2023-06-10 14:44:22 +0200 received badge  Famous Question (source)
2022-10-26 08:45:39 +0200 received badge  Taxonomist
2022-08-12 15:30:00 +0200 received badge  Notable Question (source)
2022-06-17 09:03:02 +0200 received badge  Popular Question (source)
2022-05-02 04:26:32 +0200 received badge  Popular Question (source)
2022-04-23 11:04:44 +0200 received badge  Popular Question (source)
2022-04-23 11:04:44 +0200 received badge  Notable Question (source)
2022-01-19 08:58:45 +0200 received badge  Notable Question (source)
2021-08-27 10:17:04 +0200 received badge  Popular Question (source)
2021-08-27 10:17:01 +0200 received badge  Popular Question (source)
2021-07-17 20:48:05 +0200 commented question set_trace() analog for Sage

It's no use I think. Good to have pdb when you run file like sage file.sage. But I tried and it is standard pdb without

2021-07-17 20:46:06 +0200 edited question AttributeError when load object (ideal and groebner basis) with numpy.load

AttributeError when load object (ideal and groebner basis) with numpy.load I've calculated Groebner Basis with sage and

2021-07-17 20:45:17 +0200 edited question AttributeError when load object (ideal and groebner basis) with numpy.load

AttributeError when load object (ideal and groebner basis) with numpy.load I've calculated Groebner Basis with sage and

2021-07-17 20:44:42 +0200 asked a question AttributeError when load object (ideal and groebner basis) with numpy.load

AttributeError when load object (ideal and groebner basis) with numpy.load I've calculated Groebner Basis with sage and

2021-07-14 15:24:39 +0200 asked a question set_trace() analog for Sage

set_trace() analog for Sage In sage one can use import pdb;pdb.set_trace() or in case of tests: import pytest; pytest.s

2021-07-06 14:34:27 +0200 marked best answer How to check that field is Number Field

Suppose I have field FF:

sage: FF
Number Field in z with defining polynomial t^2+1

How to programmatically check that this field is Number Field? Something like FF.is_number_field()...

2021-07-06 12:48:17 +0200 edited question How to check that field is Number Field

How to check that field is Number Field Suppose I have field FF: sage: FF Number Field in z with defining polynomial t^

2021-07-06 12:48:04 +0200 edited question How to check that field is Number Field

How to check that field is Number Field Suppose I have field `FF``: sage: FF Number Field in z with defining polynomial

2021-07-06 12:47:47 +0200 asked a question How to check that field is Number Field

How to check that field is Number Field Suppose I have field `FF``: ``` sage: FF Number Field in z with defining polyn

2021-02-02 15:14:04 +0200 received badge  Good Question (source)
2021-02-02 14:57:28 +0200 received badge  Nice Question (source)
2020-06-01 22:49:28 +0200 commented question Get point coordinates of curve over number field

@tmonteil, I've added P.S. with details

2020-06-01 22:49:28 +0200 received badge  Commentator
2020-06-01 14:56:20 +0200 asked a question Get point coordinates of curve over number field

Suppose I have equation of curve C:

curve 
# => y^2 + (x^2 + x)*y + x
curve.parent()
# => Univariate Polynomial Ring in y over Rational function field in x over Rational Field

and I know that there is a point with x value is a root of another equation (i.e. element of corresponding Number Field):

equation
# => x^3 + x^2 - 2*x - 9/2
equation.parent()
# => Univariate Polynomial Ring in x over Rational Field

is x-coordinate of some point of C.

How to properly get y-coordinate of C in x?

It is not as easy as it seems because of conversion problems.

My workaround is as following:

FF.<z> = NumberField(equation)
P.<x,y> = QQ[]

u = P(curve).subs(x=z)

P.<y> = FF[]
return z, P(u).roots()[0][0]

and it doesn't seem right.

Are there more elegant way of doing it?

P.S. curve is constructed as follows:

  F = FunctionField(QQ, 'x')
  x = F.gen()
  R.<y> = F[]

  curve = y^2 + (x^2 + x)*y + x;

But it was done in another place so I have no direct access to x and y from above code.

2020-04-18 13:06:18 +0200 received badge  Nice Question (source)
2020-04-16 21:32:49 +0200 asked a question SageMath support in Jedi (hence in jedi-vim)

I want to make jedi (autocompletion, static analysis and refactoring library for python) to understand Sage code. I want to integrate it with vim via jedi-vim but there are plenty of other editors\IDEs with support of jedi

There is a discussion with some evidence of possibility of that combo:

Well, I wound up figuring this out. I just had to turn the problem around and include the sage path in the normal python path (export PYTHONPATH=/usr/lib/sagemath/src) - not switch the Jedi interpreter to be the sage interpreter. Seems to work well now. Thanks for the response!

But I cannot figure out what should I do to make it work.

P.S. It seems that there are some successes on the subject with different approaches: PyCharm (windows) and Vscode.

2020-04-10 15:12:00 +0200 asked a question LSP (Language Server Protocol) support for SageMath

There are plenty kind of language servers for Python: LSP (palantir, sourcegraph, microsoft), jedi, rope and etc.

The Language Server protocol is used between a tool (the client) and a language smartness provider (the server) to integrate features like auto complete, go to definition, find all references and alike into the tool

There are a lot of editors (almost any) and IDE with support of that kind of language servers.

Question is: are there some adaptations of that solutions to SageMath (which is heavily based on Python and translated to Python)? Or may be some standalone solution for SageMath?

P.S. It is looked as there is evidence of some success with jedi-vim, but I cannot reproduce it at the moment.

2020-04-06 09:31:43 +0200 received badge  Nice Question (source)
2020-04-05 20:27:28 +0200 asked a question Diamond brackets <> and square brackets [] notations

Are there some documentation on diamond bracket notation:

R.<w> = PolynomialRing(QQ)

and square bracket notation:

R.<y> = QQ['y'];

There is some documentation in Constructors for polynomial rings docs but it looks superficial on this topic.

Are there some complete explanation with all the details behind the scene?

Is it only for polynomial rings or for some other objects? Is it SageMath addition?

2020-01-25 23:49:53 +0200 marked best answer Is it possible to run (may be partially) Sage with Python 3?

I want to run sage with python3. I know that it isn't fully ported, but I want to use already ported functionality and hope it cover my needs.

One particular reason is my necessity to use multiprocessing.pool with lambda function which doesn't work with python 2 and both workarounds seem to not work also.

P.S. I found third workaround which seems to be working.

2020-01-25 23:49:53 +0200 received badge  Enlightened (source)
2020-01-25 23:49:53 +0200 received badge  Good Answer (source)