def setUp(self): R = QQ['x,y'] x, y = R.gens() f1 = y**2 - x self.f1 = f1 self.X1 = RiemannSurface(f1) f2 = y**3 - x self.f2 = f2 self.X2 = RiemannSurface(f2)
def setUp(self): R = QQ['x,y'] x,y = R.gens() f1 = y**2 - x self.f1 = f1 self.X1 = RiemannSurface(f1) f2 = y**2 - (x**2 + 1) self.f2 = f2 self.X2 = RiemannSurface(f2) f3 = y**2 - (x**4 - 1) self.f3 = f3 self.X3 = RiemannSurface(f3)
def test_hyperelliptic_regular_places(self): R = QQ['x,y'] x, y = R.gens() X = RiemannSurface(y**2 - (x + 1) * (x - 1) * (x - 2) * (x + 2)) omegas = differentials(X) # the places above x=0 are regular places = X(0) for P in places: a, b = P.x, P.y for omega in omegas: omega_P = omega.centered_at_place(P) val1 = omega(a, b) val2 = omega_P(CC(0)) self.assertLess(abs(val1 - val2), 1e-8) # the places above x=oo are regular: P = (1/t, \pm 1/t**2 + O(1)) # (however, all places at infinity are treated as discriminant) # # in this particular example, omega[0] = 1/(2*y). At the places at # infinity, these are equal to \mp 0.5, respectively. (the switch in # sign comes from the derivative dxdt = -1/t**2) places = X('oo') for P in places: sign = P.puiseux_series.ypart[-2] for omega in omegas: omega_P = omega.centered_at_place(P) val1 = -sign * 0.5 val2 = omega_P(CC(0)) self.assertLess(abs(val1 - val2), 1e-8)
def test_f1_regular_places(self): X = RiemannSurface(self.f1) omegas = differentials(X) # the places above x=-1 are regular places = X(-1) for P in places: a, b = P.x, P.y for omega in omegas: omega_P = omega.centered_at_place(P) val1 = omega(a, b) val2 = omega_P(CC(0)) self.assertLess(abs(val1 - val2), 1e-8)
def test_f2_from_cycle_issue(self): # there is an unlabeled issue with the construction of certain cycles # on the curve f2. it turned out that RiemannSurfacePath_from_cycle had # incorrectly created a ComplexPath from the segments # # this tests is here just to assert that no errors are raised or that # the calculation doesn't time out R = QQ['x,y'] x,y = R.gens() f = -x**7 + 2*x**3*y + y**3 X = RiemannSurface(f) PF = X.path_factory a_tuples = PF.skeleton.a_cycles() b_tuples = PF.skeleton.b_cycles() for cycle in a_tuples + b_tuples: gamma = PF.RiemannSurfacePath_from_cycle(cycle)
def setUp(self): R = QQ['x,y']; x,y = R.gens() f43 = y**3*((y**4-16)**2 - 2*x) - x**12 self.f43 = f43 self.X43 = RiemannSurface(f43) _ = self.X43.discriminant_points
f1 = (x**2 - x + 1)*y**2 - 2*x**2*y + x**4 f2 = -x**7 + 2*x**3*y + y**3 f3 = (y**2-x**2)*(x-1)*(2*x-3) - 4*(x**2+y**2-2*x)**2 f4 = y**2 + x**3 - x**2 f5 = (x**2 + y**2)**3 + 3*x**2*y - y**3 f6 = y**4 - y**2*x + x**2 f7 = y**3 - (x**3 + y)**2 + 1 f8 = (x**6)*y**3 + 2*x**3*y - 1 f9 = 2*x**7*y + 2*x**7 + y**3 + 3*y**2 + 3*y f10 = (x**3)*y**4 + 4*x**2*y**2 + 2*x**3*y - 1 f11 = y**2 - (x-2)*(x-1)*(x+1)*(x+2) f12 = x**4 + y**4 - 1 f = f2 X = RiemannSurface(f,x,y) print '=== base point ===' print X.base_point() print '\n=== base sheets ===' print X.base_sheets() PF = X.PF # print '\n=== plotting x-path ===' # t = linspace(0,1,32) # gamma.plot_x(t) print '\n=== branch_points ===' b = PF.branch_points() print b