Ask Your Question

Stepan's profile - activity

2016-04-22 13:55:08 +0200 commented answer Coercion on continued fractions

Indeed, doing continued_fraction(3*x) is probably faster than 3 * continued_fraction(x) as it is intended to be done for #19120 - however, you need to know the value of x to do that! (the algorithm mirgee is working on finds its use if you don't have the value of x)

2015-12-03 15:00:28 +0200 received badge  Scholar (source)
2015-12-01 07:24:09 +0200 asked a question Latex name of generators of number fields extending other number field

If I run this code

G.<alpha> = NumberField(x^2-2,latex_name='alpharedefined')
print latex(alpha) #show(alpha)
P.<t> = G[]
H.<beta> = NumberField(t^4-alpha,latex_name='betaredefined')
print latex(beta) #show(beta)

I don't get the latex name of beta redefined. It works for alpha ... Anyone can see where the problem is?

2015-12-01 07:19:01 +0200 commented answer How to create an object representing the set {a*S + b*T | a,b in ZZ}?

Hello Vincent,

thank you for your answer! My motivation however was to use SageMath's structures, not really implement my class as I was exploring its possibilities.

Anyway, to get what I need I will have to do my class anyway, so thanks.

2015-11-24 12:09:59 +0200 received badge  Student (source)
2015-11-23 23:17:11 +0200 asked a question How to create an object representing the set {a*S + b*T | a,b in ZZ}?

I would like to construct an object which represents the following set {aS + bT | a,b in ZZ} where S, T are given. If S and T are two linearly independent vectors, I can manage to do it by constructing a submodule and then changing its base ring to ZZ, if the ambient field of the vector space is QQ.

sage: V = VectorSpace(QQ,2)
sage: S = V.submodule_with_basis([[1,1],[2,1]])
sage: S = S.change_ring(ZZ)
sage: S

However, I would like to have S = 1 and T equal to some irrational algebraic. In this case, I am unable to construct my set using a submodule of a vector space as above (the changing of ring expects the entries of elements of the vector space to be elements of QQ...). Is there some good way to use the SageMath's structures to produce this set?

I can construct a generic free module and map from and to QQ(T), but I was wondering if there is a better way.