コード例 #1
0
    def test_orbit(self):
        for conv in ['McClure-Smith', 'Berger-Fresse']:
            x = Surjection_element({(1, 3, 1, 2, 1): 1}, convention=conv)
            a = x.orbit(representation='trivial')
            self.assertEqual(a, Surjection_element({(1, 2, 1, 3, 1): 1},
                                                   convention=conv))

            b = x.orbit(representation='sign')
            self.assertEqual(b, Surjection_element({(1, 2, 1, 3, 1): -1},
                                                   convention=conv))
コード例 #2
0
 def test_compose_bf(self):
     i = 3
     x = Surjection_element({(3, 2, 1, 2, 1, 3): 1},
                            convention='Berger-Fresse')
     y = Surjection_element({(3, 1, 2, 1, 4, 3): 1},
                            convention='Berger-Fresse')
     dx, dy = x.boundary(), y.boundary()
     dx_y, x_dy = dx.compose(y, i), x.compose(dy, i)
     xy = x.compose(y, i)
     d_xy = xy.boundary()
     self.assertEqual(d_xy - dx_y - (-1)**(x.degree) * x_dy, x.zero())
コード例 #3
0
    def test_suspension(self):
        x = Surjection_element({(1, 3, 2, 1, 2, 3, 4): 1},
                               convention='Berger-Fresse')
        y = Surjection_element({(1, 2, 3, 1, 2, 3): 1},
                               convention='Berger-Fresse')
        sx = x.suspension()
        sy = y.suspension()
        xy = x.compose(y, 1)
        self.assertEqual(xy.suspension(), sx.compose(sy, 1))

        z = Surjection_element({(1, 2, 1, 3, 1, 2, 3): 1},
                               convention='Berger-Fresse')
        sz = z.suspension()
        xz = x.compose(z, 2)
        self.assertEqual(xz.suspension(), sx.compose(sz, 1))
コード例 #4
0
    def test_rmul(self):
        rho = SymmetricRing.rotation_element(3)
        a, b = (rho * self.x).boundary(), rho * self.x.boundary()
        self.assertEqual(a, b)

        self.x.convention = 'Berger-Fresse'
        a, b = (rho * self.x).boundary(), rho * self.x.boundary()
        self.assertEqual(a, b)

        self.assertEqual(3 * self.x, Surjection_element({(1, 3, 1, 2, 1): 3}))
コード例 #5
0
 def setUp(self):
     self.x = Surjection_element({(1, 3, 1, 2, 1): 1})
コード例 #6
0
ファイル: test_surjection.py プロジェクト: wreise/clesto
    def test_orbit(self):
        a = self.x.orbit(representation='trivial')
        self.assertEqual(a, Surjection_element({(1, 2, 1, 3, 1): 1}))

        b = self.x.orbit(representation='sign')
        self.assertEqual(b, Surjection_element({(1, 2, 1, 3, 1): -1}))