def test_gamma0(self): # no-op s = (0, 0, 1) f, alpha, beta = _transform(self.f1, s) self.assertEqual(self.f1, f) f, alpha, beta = _transform(self.f2, s) self.assertEqual(self.f2, f) f, alpha, beta = _transform(self.f3, s) self.assertEqual(self.f3, f)
def test_gamma0(self): # no-op s = (0,0,1) f,alpha,beta = _transform(self.f1, s) self.assertEqual(self.f1, f) f,alpha,beta = _transform(self.f2, s) self.assertEqual(self.f2, f) f,alpha,beta = _transform(self.f3, s) self.assertEqual(self.f3, f)
def recenter_curve(g, singular_point): r"""Returns a curve centered at a given singular point. Given a singular point :math:`(x : y : z) = (\alpha : \beta : \gamma)`on a Riemann surface :func:`recenter_curve` returns an affine curve :math:`h = h(u,v)` such that the singularity occurs at :math:`u = 0` where * :math:`u,v = x,y` if :math:`\gamma = 1` * :math:`u,v = x,z` if :math:`\gamma = 0` :func:`recenter_curve` is written in such a way to preserve the base ring of the original curve in the case when it's a polynomial ring. For example, if :math:`g \in R[c][x,y]` then `h \in R[c][u,v]`. See Also -------- abelfunctions.singularities._transform : recenters a given curve at the singular point such that the singularity occurs at :math:`u = u0` """ # recenter the curve and adjoint polynomial at the singular point: find # the affine plane u,v such that the singularity occurs at u=0 gsing,u0,v0 = _transform(g,singular_point) R = gsing.parent() u,v = R.gens() h = gsing(u+u0,v) return h
def test_beta0(self): s = (1, 0, 0) f, _, _ = _transform(self.f1, s) u, v = f.parent().gens() g = u**2 - u**2 * v + u**2 * v**2 - 2 * u * v + 1 self.assertEqual(f, g)
def test_alpha0(self): s = (0, 1, 0) f, _, _ = _transform(self.f1, s) u, v = f.parent().gens() g = u**2 - u * v + v**2 - 2 * u**2 * v + u**4 self.assertEqual(f, g)
def test_beta0(self): s = (1,0,0) f,_,_ = _transform(self.f1, s) u,v = f.parent().gens() g = u**2 - u**2*v + u**2*v**2 - 2*u*v + 1 self.assertEqual(f, g)
def test_alpha0(self): s = (0,1,0) f,_,_ = _transform(self.f1, s) u,v = f.parent().gens() g = u**2 - u*v + v**2 - 2*u**2*v + u**4 self.assertEqual(f, g)