Пример #1
0
 def test_standard_basis_irredundent(self):
     x = self.x
     y = self.y
     z = self.z
     sm1 = SingularModule([[x, y + z, z**3 - 2 * y], [x, y, z],
                           [x, y, z**2]])
     std_gens = sm1.standard_basis()
     std_mod = SingularModule(std_gens)
     self.assertTrue(sm1.equals(std_mod))
Пример #2
0
 def test_equals_not(self):
     x = self.x
     y = self.y
     z = self.z
     sm1 = SingularModule([[x, y + z, z**3 - 2 * y], [x, y, z],
                           [x, y, z**2]])
     sm2 = SingularModule([[x, y, z]])
     #Assert these are not equal
     self.assertFalse(sm1.equals(sm2))
 def test_2_modules_crossing_ngens(self):
   x = self.x
   y = self.y
   z = self.z
   zero = self.poly_ring.zero()
   crossing = self.x*self.y*self.z
   logdf = LogarithmicDifferentialForms(crossing)
   crossing_2_module = SingularModule([[z,zero,zero],[zero,y,zero],[zero,zero,x]])
   self.assertTrue(crossing_2_module.equals(logdf.p_module(2)))
 def test_1_modules_crossing_ngens(self):
   x = self.x
   y = self.y
   z = self.z
   zero = self.poly_ring.zero()
   crossing = x*y*z
   logdf = LogarithmicDifferentialForms(crossing)
   crossing_1_module = SingularModule([[y*z,zero,zero],[zero,x*z,zero],[zero,zero,x*y]])
   self.assertTrue(crossing_1_module.equals(logdf.p_module(1)))
Пример #5
0
 def test_equals_B(self):
     x = self.x
     y = self.y
     z = self.z
     zero = self.poly_ring.zero()
     #Assert these are equal - from crossing divisor
     sm1 = SingularModule([[x, zero, zero], [zero, y, zero],
                           [zero, zero, z]])
     sm2 = SingularModule([[zero, y, z], [zero, zero, z], [x, zero, zero]])
     self.assertTrue(sm1.equals(sm2))
Пример #6
0
 def test_equals_A(self):
     x = self.x
     y = self.y
     z = self.z
     #Assert these are equal
     sm1 = SingularModule([[x, y + z, z**3 - 2 * y], [x, y, z],
                           [x, y, z**2]])
     sm2 = SingularModule([[x, y, z], [x, y + z, z**3 - 2 * y],
                           [x, y, z**2]])
     self.assertTrue(sm1.equals(sm2))
Пример #7
0
 def test_reduce_lossless(self):
     x = self.x
     y = self.y
     z = self.z
     sm1 = SingularModule([[x, y + z, z**3 - 2 * y], [x, y, z],
                           [x, y, z**2]])
     sm2 = SingularModule([[x, y + z, z**3 - 2 * y], [x, y, z],
                           [x, y, z**2]])
     sm2.reduce_generators()
     self.assertTrue(sm1.equals(sm2))
 def test_3_modules_crossing_ngens(self):
   crossing = self.x*self.y*self.z
   logdf = LogarithmicDifferentialForms(crossing)
   crossing_3_module = SingularModule([[self.poly_ring.one()]])
   self.assertTrue(crossing_3_module.equals(logdf.p_module(3)))
 def test_0_modules_crossing_ngens(self):
   crossing = self.x*self.y*self.z
   logdf = LogarithmicDifferentialForms(crossing)
   crossing_0_module = SingularModule([[crossing]])
   self.assertTrue(crossing_0_module.equals(logdf.p_module(0)))