Ask Your Question

ZacariasSatrustegui's profile - activity

2021-01-21 13:13:50 +0200 received badge  Popular Question (source)
2021-01-17 18:51:48 +0200 received badge  Famous Question (source)
2020-01-18 16:32:36 +0200 received badge  Notable Question (source)
2019-10-21 12:33:16 +0200 received badge  Popular Question (source)
2018-11-04 19:53:47 +0200 received badge  Student (source)
2018-09-26 09:47:13 +0200 commented answer Roots of Polynomials over finite Fields

I want to do the addition of 2 points of this equations (a point of this equation is a P=[x,y] such that f(P)=0) The addition for example would be -> [x1+x2, y1,y2], do you know how?

2018-09-25 18:28:07 +0200 commented answer Roots of Polynomials over finite Fields

I want to do the addition of 2 points of this equations (a point of this equation is a P=[x,y] such that f(P)=0) The addition for example would be -> [x1+x2, y1,y2]

2018-09-25 18:24:04 +0200 commented answer Roots of Polynomials over finite Fields

I think that I understood your answer but, in your case, Why do you define R If you don't use it afterwards? Thank you so much

2018-09-24 19:26:43 +0200 asked a question Inverse of a number modulo 2**255 -19

I don't understand this code to solve the inverse of a number:

b = 256;
q = 2**255 - 19

def expmod(b,e,m): 
    if e == 0: return 1
    t = expmod(b,e/2,m)**2 % m
    if e & 1: t = (t*b) % m
    return t

def inv(x):
   return expmod(x,q-2,q)`

Finally, If I want to put: $\frac{2}{3}$ I can to do this: aux=2*inv(3)

What does the variable e mean?

Could you explain me this code, please?

Thank you so much.

2018-09-23 20:17:59 +0200 asked a question Roots of Polynomials over finite Fields

Hi guys,

How can I define all polynomial as this form -> a*x^2+b*y-1 over QQ where a and b are constants. for examples polynomials as : 2*x^2+3*y-1 or 5*x^2+y-1 , ... I know that I have to create a PolynomialRing, but I don't understand how exactly.

Thank you so much.

2018-09-23 20:01:56 +0200 asked a question Roots of a Polynomial in a PolynomialRing

If I do:

R.<x,y>= PolynomialRing(QQ,2)

f=x^2-y^2

f.roots()

Why it doesn't work? And next code work:

R.<x>= PolynomialRing(QQ)

f=x^2-1

f.roots()

I don't understand why.

And one more things, If I want to define all polinomials as this form -> ax^2 - by^2 where $a$ and $b$ are constants. Have I do this?

R.<a,b,x,y>=PolynomialRing(QQ,4)

I=R.Ideal([a*x^2 - b*y^2])

f= 2*x^2 - 3*y^2

How can I do that?

Thank you so much.

2018-09-22 11:01:31 +0200 received badge  Scholar (source)
2018-09-22 10:55:06 +0200 commented answer PolynomialRing in Sage

OHHHHHH!!! Really soo soooo thanks!!! but... one more things, I put here -> https://ask.sagemath.org/question/43721/poylinomialring-in-sage-2/ (https://ask.sagemath.org/question/437...) a question, and I know you would know answer me. Really thank you so much!!

2018-09-22 10:53:37 +0200 received badge  Editor (source)
2018-09-22 10:53:11 +0200 asked a question Ideal of a PolynomialRing

-> ask.sagemath.org/question/43714/polynomialring-in-sage/
put before https://

Continuous of other question: One thing more, If I have a equation as this form: ax^2+1d*y^2 And depends of variable $a$ and $d$ it's a different polynomial. And If I want to solve the points where this ecuation is zero. whatever $a$ and $d$. And the Affine point are (x,y) and projective point (X,Y,Z) where x=X/Z; y=Y/Z and Z!=0, so a point (x1,y1) is (X1,Y1,Z1) in projective Coordinates. I readed that I have to do this:

def mynumerator(x):

if parent(x) == R:
  return x
return numerator(x)

def reduce(self):

  return fastfrac(self.top / self.bot)

R.<ua,ud,ux2,uy2,ux1,uy1,ux1,uy1,uz1,ux2,uy2,uz2> = PolynomialRing(QQ,12,order='invlex')

I = R.ideal([
mynumerator((uaux1^2)-(1+uduy1^2))
, mynumerator((ux1)-(uX1/uZ1))
, mynumerator((uy1)-(uY1/uZ1))
, mynumerator((uaux2^2)-(1+uduy2^2))
, mynumerator((ux2)-(uX2/uZ2))
, mynumerator((uy2)-(uY2/uZ2))
])

J = I + R.ideal([0
, uX1-uX2
, uY1-uY2
, uZ1-uZ2
])

ua = fastfrac(ua)
ud = fastfrac(ud)
ux2 = fastfrac(ux2)
uy2 = fastfrac(uy2)
ux1 = fastfrac(ux1)
uy1 = fastfrac(uy1)
uX1 = fastfrac(uX1)
uY1 = fastfrac(uY1)
uZ1 = fastfrac(uZ1)
uX2 = fastfrac(uX2)
uY2 = fastfrac(uY2)
uZ2 = fastfrac(uZ2)

//formula to solve a point of the equation
ux3 = (((ux1uy2+uy1ux2)/(fastfrac(1)+udux1ux2uy1uy2))).reduce()
uy3 = (((uy1uy2-uaux1ux2)/(fastfrac(1)-udux1ux2uy1*uy2))).reduce()

so I guess (ux3,uy3) is a point of the equation.

But I don't understand why I have to create a Ideal $I$ and then $J$

And the most important, If I want to solve every points of equations for example $ua*ux1^2=1+ud*uy1^2$ where $ua=2$ and $ud=1$ How can I make that?

Thank you so much.

2018-09-21 14:56:24 +0200 asked a question PolynomialRing in Sage

What does this "fastfrac" function do? Because I don't understand for example, what does "numerator()" function?

What is the sintaxis R(numerator(top)) I don't understand.

R.<ua,ud,ux2,uy2,ux1,uy1,ux1,uy1,uz1,ux2,uy2,uz2> = PolynomialRing(QQ,12,order='invlex')

class fastfrac:

def __init__(self,top,bot=1):

if parent(top) == ZZ or parent(top) == R:
  self.top = R(top)
  self.bot = R(bot)
elif top.__class__ == fastfrac:
  self.top = top.top
  self.bot = top.bot * bot
else:
  self.top = R(numerator(top))
  self.bot = R(denominator(top)) * bot

Thank you so much.