Dual pairs of algebras

Dual pairs of algebras, representing finite flat group schemes.

class dual_pairs.dual_pair.DualPairFactory(*args: Any, **kwargs: Any)

Factory for dual pairs of algebras.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: R.<x> = GF(3)[]
sage: A = FiniteFlatAlgebra(GF(3), [x, x, x])
sage: B = FiniteFlatAlgebra(GF(3), x^3 - 1)
sage: Phi = Matrix.identity(GF(3), 3)
sage: D = DualPair(A, B, Phi); D
Dual pair of algebras over Finite Field of size 3
A = Finite flat algebra of degree 3 over Finite Field of size 3, product of:
Finite Field of size 3
Finite Field of size 3
Finite Field of size 3
B = Monogenic algebra of degree 3 over Finite Field of size 3 with defining polynomial x^3 + 2

Note

When constructing a dual pair of algebras, it is not checked whether the given triple \((A, B, \Phi)\) satisfies the axioms for a dual pair, since this check is rather expensive. Use is_valid() to check validity.

create_key(*data)

Return a key for the dual pair of algebras defined by the given data.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: R.<x> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [x, x, x^2 + 17])
sage: Phi = Matrix(QQ, [[1/4,  1/4,  1/2,   0],
....:                   [1/4,  1/4, -1/2,   0],
....:                   [1/2, -1/2,    0,   0],
....:                   [  0,    0,    0, -17]])
sage: DualPair.create_key(A, Phi)
(
Finite flat algebra of degree 4 over Rational Field, product of:
Number Field in a0 with defining polynomial x
Number Field in a1 with defining polynomial x
Number Field in a2 with defining polynomial x^2 + 17            ,
Finite flat algebra of degree 4 over Rational Field, product of:
Number Field in a0 with defining polynomial x
Number Field in a1 with defining polynomial x
Number Field in a2 with defining polynomial x^2 + 17            ,
[ 1/4  1/4  1/2    0]
[ 1/4  1/4 -1/2    0]
[ 1/2 -1/2    0    0]
[   0    0    0  -17]
)
create_object(version, key)

Return the dual pair of algebras defined by the given key.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: R.<x> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [x, x, x^2 + 17])
sage: Phi = Matrix(QQ, [[1/4,  1/4,  1/2,   0],
....:                   [1/4,  1/4, -1/2,   0],
....:                   [1/2, -1/2,    0,   0],
....:                   [  0,    0,    0, -17]])
sage: DualPair.create_object((8, 8), (A, A, Phi))
Dual pair of algebras over Rational Field
A = Finite flat algebra of degree 4 over Rational Field, product of:
Number Field in a0 with defining polynomial x
Number Field in a1 with defining polynomial x
Number Field in a2 with defining polynomial x^2 + 17
B = Finite flat algebra of degree 4 over Rational Field, product of:
Number Field in a0 with defining polynomial x
Number Field in a1 with defining polynomial x
Number Field in a2 with defining polynomial x^2 + 17
class dual_pairs.dual_pair.DualPair_class(*args: Any, **kwargs: Any)

A dual pair of finite flat algebras.

EXAMPLES:

sage: R.<x> = QQ[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(QQ, [x, x, x^2 + 17])
sage: Phi = Matrix(QQ, [[1/4,  1/4,  1/2,   0],
....:                   [1/4,  1/4, -1/2,   0],
....:                   [1/2, -1/2,    0,   0],
....:                   [  0,    0,    0, -17]])
sage: D = DualPair(A, Phi)
sage: D
Dual pair of algebras over Rational Field
A = Finite flat algebra of degree 4 over Rational Field, product of:
Number Field in a0 with defining polynomial x
Number Field in a1 with defining polynomial x
Number Field in a2 with defining polynomial x^2 + 17
B = Finite flat algebra of degree 4 over Rational Field, product of:
Number Field in a0 with defining polynomial x
Number Field in a1 with defining polynomial x
Number Field in a2 with defining polynomial x^2 + 17
sage: D.category()
Category of objects
add(P, Q)

Return the sum of P and Q under the group operation of self.

EXAMPLES:

sage: R.<x> = QQ[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(QQ, [x, x, x^2 + 17])
sage: Phi = Matrix(QQ, [[1/4,  1/4,  1/2,   0],
....:                   [1/4,  1/4, -1/2,   0],
....:                   [1/2, -1/2,    0,   0],
....:                   [  0,    0,    0, -17]])
sage: D = DualPair(A, Phi)
sage: L.<a> = D.splitting_field()
sage: O, P, Q, R = D.points(L)
sage: D.add(P, Q) == R
True
algebra1()

Return the algebra A attached to self.

TESTS:

sage: K.<a> = FunctionField(QQ)
sage: R.<x> = K[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(K, [x, x^2 - a])
sage: B = FiniteFlatAlgebra(K, [x, x^2 + 3*a])
sage: Phi = Matrix(K, [[1/3,  2/3,   0],
....:                  [2/3, -2/3,   0],
....:                  [  0,    0, 2*a]])
sage: D = DualPair(A, B, Phi)
sage: D.algebra1()
Finite flat algebra of degree 3 over Rational function field in a over Rational Field, product of:
Function field in a0 defined by a0
Function field in a1 defined by a1^2 - a
algebra2()

Return the algebra B attached to self.

TESTS:

sage: K.<a> = FunctionField(QQ)
sage: R.<x> = K[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(K, [x, x^2 - a])
sage: B = FiniteFlatAlgebra(K, [x, x^2 + 3*a])
sage: Phi = Matrix(K, [[1/3,  2/3,   0],
....:                  [2/3, -2/3,   0],
....:                  [  0,    0, 2*a]])
sage: D = DualPair(A, B, Phi)
sage: D.algebra2()
Finite flat algebra of degree 3 over Rational function field in a over Rational Field, product of:
Function field in a0 defined by a0
Function field in a1 defined by a1^2 + 3*a
artin_conductor()

Return the prime-to-l part of the Artin conductor of self.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: R.<t> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [t, t^3 - t + 1])
sage: phi = 1/4*Matrix([[1,  3, 0,  2],
....:                   [3, -3, 0, -2],
....:                   [0,  0, 4, -6],
....:                   [2, -2, -6, 0]])
sage: D = DualPair(A, phi)
sage: D.artin_conductor()
23

sage: R.<x> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [x, x, x^2 + 17])
sage: Phi = Matrix(QQ, [[1/4,  1/4,  1/2,   0],
....:                   [1/4,  1/4, -1/2,   0],
....:                   [1/2, -1/2,    0,   0],
....:                   [  0,    0,    0, -17]])
sage: D = DualPair(A, Phi)
sage: D.artin_conductor()
17

sage: D = DualPair(QQ, [[t, t^3 - 2]], [[1/4, 3/4, 0, 0], [3/4, -3/4, 0, 0], [0, 0, 0, 3], [0, 0, 3, 0]])
sage: D.artin_conductor()
27

sage: D = DualPair(QQ, [[t, t^8 - 4*t^7 + 10*t^6 - 16*t^5 + 16*t^4 - 4*t^3 - 14*t^2 + 20*t - 11], [[1], [1, 3/23*t^7 - 20/23*t^6 + 45/23*t^5 - 76/23*t^4 + 59/23*t^3 + 7/23*t^2 - 99/23*t + 94/23, -1/23*t^7 - 1/23*t^6 + 8/23*t^5 - 13/23*t^4 + 34/23*t^3 - 10/23*t^2 - 13/23*t + 30/23, -4/23*t^7 - 4/23*t^6 + 9/23*t^5 - 29/23*t^4 + 44/23*t^3 - 17/23*t^2 - 29/23*t + 74/23, t - 1, 15/23*t^7 - 54/23*t^6 + 110/23*t^5 - 150/23*t^4 + 88/23*t^3 + 81/23*t^2 - 219/23*t + 148/23, -4/23*t^7 + 19/23*t^6 - 37/23*t^5 + 63/23*t^4 - 48/23*t^3 + 6/23*t^2 + 63/23*t - 41/23, 18/23*t^7 - 51/23*t^6 + 109/23*t^5 - 134/23*t^4 + 78/23*t^3 + 65/23*t^2 - 180/23*t + 81/23]]], [[1/9, 8/9, 0, -4/9, 4/9, -4/9, 4/9, 4/9, -4/9], [8/9, -8/9, 0, 4/9, -4/9, 4/9, -4/9, -4/9, 4/9], [0, 0, 0, 0, 0, 0, 0, 0, -4], [-4/9, 4/9, 0, 16/9, 20/9, 16/9, 20/9, 20/9, 16/9], [4/9, -4/9, 0, 20/9, 16/9, -16/9, 16/9, -20/9, 20/9], [-4/9, 4/9, 0, -20/9, -16/9, -20/9, 20/9, -16/9, 16/9], [4/9, -4/9, 0, 20/9, 16/9, -16/9, 16/9, 16/9, -16/9], [4/9, -4/9, 0, 20/9, -20/9, -16/9, 16/9, 16/9, 20/9], [-4/9, 4/9, 4, -20/9, 20/9, 16/9, 20/9, 20/9, -20/9]])
sage: D.artin_conductor()  # long time (14 s)
32
automorphism_matrix(aut, basis=None)

Return the matrix of the automorphism aut.

INPUT:

  • aut – an automorphism of L over K, where K is the base field of self and L is an extension of K

  • basis – basis of the group of L-points of self (default: choose some basis)

OUTPUT:

The matrix of the left action of aut on the group of L-points of self.

Note

Beware that this returns the matrix of a left action, although matrices in Sage act from the right by default.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: R.<t> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [t, t^3 - t + 1])
sage: phi = 1/4*Matrix([[1,  3, 0,  2],
....:                   [3, -3, 0, -2],
....:                   [0,  0, 4, -6],
....:                   [2, -2, -6, 0]])
sage: D = DualPair(A, phi)
sage: L.<z> = NumberField(x^6 + 7*x^4 + 18*x^2 + 23)
sage: aut = L.hom([1/14*(z^5 + z^4 + 8*z^3 + z^2 + 26*z - 2)])
sage: D.automorphism_matrix(aut)
[1 1]
[1 0]

The representation is a group homomorphism:

sage: rho = D.automorphism_matrix
sage: G = L.automorphisms()
sage: all(rho(s * t) == rho(s) * rho(t) for s in G for t in G)
True
change_ring(R)

Return a copy of self base-changed to R.

EXAMPLES:

sage: from dual_pairs import DualPair
sage: R.<t> = ZZ[]
sage: D = DualPair(ZZ, [[t, t]], [t^2 - 1], [[1, 0], [0, 1]])
sage: D
Dual pair of algebras over Integer Ring
A = Finite flat algebra of degree 2 over Integer Ring, product of:
Order in Number Field in a0 with defining polynomial t
Order in Number Field in a1 with defining polynomial t
B = Monogenic algebra of degree 2 over Integer Ring with defining polynomial t^2 - 1
sage: D.change_ring(GF(7))
Dual pair of algebras over Finite Field of size 7
A = Finite flat algebra of degree 2 over Finite Field of size 7, product of:
Finite Field of size 7
Finite Field of size 7
B = Monogenic algebra of degree 2 over Finite Field of size 7 with defining polynomial t^2 + 6
conductor_exponent(p)

Return the exponent of the local Artin conductor of self at p.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: R.<t> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [t, t^3 - t + 1])
sage: phi = 1/4*Matrix([[1,  3, 0,  2],
....:                   [3, -3, 0, -2],
....:                   [0,  0, 4, -6],
....:                   [2, -2, -6, 0]])
sage: D = DualPair(A, phi)
sage: D.conductor_exponent(2)
0
sage: D.conductor_exponent(7)
0
sage: D.conductor_exponent(23)
1
counit1()

Return the vector of coefficients of the counit of the algebra A as an element of the dual of the underlying module.

EXAMPLES:

sage: K.<a> = FunctionField(QQ)
sage: R.<x> = K[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(K, [x, x^2 - a])
sage: B = FiniteFlatAlgebra(K, [x, x^2 + 3*a])
sage: Phi = Matrix(K, [[1/3,  2/3,   0],
....:                  [2/3, -2/3,   0],
....:                  [  0,    0, 2*a]])
sage: D = DualPair(A, B, Phi)
sage: D.counit1()
(1, 0, 0)
counit2()

Return the vector of coefficients of the counit of the algebra B as an element of the dual of the underlying module.

EXAMPLES:

sage: K.<a> = FunctionField(QQ)
sage: R.<x> = K[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(K, [x, x^2 - a])
sage: B = FiniteFlatAlgebra(K, [x, x^2 + 3*a])
sage: Phi = Matrix(K, [[1/3,  2/3,   0],
....:                  [2/3, -2/3,   0],
....:                  [  0,    0, 2*a]])
sage: D = DualPair(A, B, Phi)
sage: D.counit2()
(1, 0, 0)
degree()

Return the degree of self.

EXAMPLES:

sage: R.<x> = QQ[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(QQ, [x, x, x^2 + 17])
sage: Phi = Matrix(QQ, [[1/4,  1/4,  1/2,   0],
....:                   [1/4,  1/4, -1/2,   0],
....:                   [1/2, -1/2,    0,   0],
....:                   [  0,    0,    0, -17]])
sage: D = DualPair(A, Phi)
sage: D.degree()
4
dual()

Return the Cartier dual of self.

EXAMPLES:

sage: K.<a> = FunctionField(QQ)
sage: R.<x> = K[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(K, [x, x^2 - a])
sage: B = FiniteFlatAlgebra(K, [x, x^2 + 3*a])
sage: Phi = Matrix(K, [[1/3,  2/3,   0],
....:                  [2/3, -2/3,   0],
....:                  [  0,    0, 2*a]])
sage: D = DualPair(A, B, Phi)
sage: D.dual()
Dual pair of algebras over Rational function field in a over Rational Field
A = Finite flat algebra of degree 3 over Rational function field in a over Rational Field, product of:
Function field in a0 defined by a0
Function field in a1 defined by a1^2 + 3*a
B = Finite flat algebra of degree 3 over Rational function field in a over Rational Field, product of:
Function field in a0 defined by a0
Function field in a1 defined by a1^2 - a
dual_points(R)

Return the group of points of the dual of self over R.

EXAMPLES:

sage: R.<x> = QQ[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(QQ, [x, x, x^2 + 17])
sage: Phi = Matrix(QQ, [[1/4,  1/4,  1/2,   0],
....:                   [1/4,  1/4, -1/2,   0],
....:                   [1/2, -1/2,    0,   0],
....:                   [  0,    0,    0, -17]])
sage: D = DualPair(A, Phi)
sage: L.<a> = D.splitting_field()
sage: L
Number Field in a with defining polynomial x^2 + 17
sage: D.dual_points(L)
[(1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, a), (0, 0, 1, -a)]
frobenius_charpoly(q=None)

Return the characteristic polynomial of the q-power Frobenius automorphism on self.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: R.<t> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [t, t^3 - t + 1])
sage: phi = 1/4*Matrix([[1,  3, 0,  2],
....:                   [3, -3, 0, -2],
....:                   [0,  0, 4, -6],
....:                   [2, -2, -6, 0]])
sage: D = DualPair(A, phi)
sage: {p: D.frobenius_charpoly(p) for p in {3, 5, 7, 11, 13}}
{3: x^2 + x + 1,
 5: x^2 + 1,
 7: x^2 + 1,
 11: x^2 + 1,
 13: x^2 + x + 1}

A more complicated example:

sage: from dual_pairs.dual_pair_import import dual_pair_import
sage: D = dual_pair_import('example_data/GL2_mod_5.gp')
sage: {p: D.frobenius_charpoly(p) for p in {3, 7, 11, 13, 17, 19, 23}}
{3: x^2 + 4*x + 2,
 7: x^2 + x + 3,
 11: x^2 + 4*x + 1,
 13: x^2 + 3*x + 2,
 17: x^2 + 3,
 19: x^2 + x + 4,
 23: x^2 + x + 2}
frobenius_matrix(q=None)

Return the matrix of the q-power Frobenius automorphism on self.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: R.<t> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [t, t^3 - t + 1])
sage: phi = 1/4*Matrix([[1,  3, 0,  2],
....:                   [3, -3, 0, -2],
....:                   [0,  0, 4, -6],
....:                   [2, -2, -6, 0]])
sage: D = DualPair(A, phi)
sage: {p: D.frobenius_matrix(p) for p in {3, 5, 7, 11, 13}}
{3: [0 1]
    [1 1],
 5: [1 1]
    [0 1],
 7: [1 1]
    [0 1],
 11: [1 1]
     [0 1],
 13: [0 1]
     [1 1]}
sage: D.frobenius_matrix(2)
Traceback (most recent call last):
...
ZeroDivisionError: inverse of Mod(0, 2) does not exist
sage: D.frobenius_matrix(23)
Traceback (most recent call last):
...
ZeroDivisionError: input matrix must be nonsingular
group_structure(L)

Return the structure of the group of L-points of self.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: R.<x> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [x, x, x^2 + 17])
sage: Phi = Matrix(QQ, [[1/4,  1/4,  1/2,   0],
....:                   [1/4,  1/4, -1/2,   0],
....:                   [1/2, -1/2,    0,   0],
....:                   [  0,    0,    0, -17]])
sage: D = DualPair(A, Phi)
sage: M, E, P, Q, basis1, basis2, zeta, dlog = D.group_structure(ComplexField())
sage: M
Additive abelian group isomorphic to Z/2 + Z/2
sage: E
[  0   0   0   0]
[  0 1/2   0 1/2]
[  0   0 1/2 1/2]
[  0 1/2 1/2   0]
sage: P
[   1.00000000000000   0.000000000000000   0.000000000000000   0.000000000000000]
[  0.000000000000000   0.000000000000000    1.00000000000000 -4.12310562561766*I]
[  0.000000000000000    1.00000000000000   0.000000000000000   0.000000000000000]
[  0.000000000000000   0.000000000000000    1.00000000000000  4.12310562561766*I]
sage: Q
[   1.00000000000000   0.000000000000000   0.000000000000000   0.000000000000000]
[  0.000000000000000    1.00000000000000   0.000000000000000   0.000000000000000]
[  0.000000000000000   0.000000000000000    1.00000000000000 -4.12310562561766*I]
[  0.000000000000000   0.000000000000000    1.00000000000000  4.12310562561766*I]
sage: basis1
((0.000000000000000, 1.00000000000000, 0.000000000000000, 0.000000000000000),
 (0.000000000000000, 0.000000000000000, 1.00000000000000, -4.12310562561766*I))
sage: basis2
((0.000000000000000, 0.000000000000000, 1.00000000000000, -4.12310562561766*I),
 (0.000000000000000, 1.00000000000000, 0.000000000000000, 0.000000000000000))
sage: zeta
(-1.00000000000000, -1.00000000000000)
sage: dlog
<function _dlog_fun.<locals>.<lambda> at 0x...>

A more complicated example:

sage: from dual_pairs.dual_pair_import import dual_pair_import
sage: D = dual_pair_import('example_data/GL2_mod_7.gp')
sage: D.group_structure(ComplexField(200))[0]
Additive abelian group isomorphic to Z/7 + Z/7
group_structure_algebraic_closure()

Return the group of points of self over an algebraic closure.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: F = GF(23)
sage: R.<x> = F[]
sage: A = FiniteFlatAlgebra(F, [x, x, x^2 + 17])
sage: Phi = Matrix(F, [[1/4,  1/4,  1/2,   0],
....:                  [1/4,  1/4, -1/2,   0],
....:                  [1/2, -1/2,    0,   0],
....:                  [  0,    0,    0, -17]])
sage: D = DualPair(A, Phi)
sage: D.group_structure_algebraic_closure()[0]
Additive abelian group isomorphic to Z/2 + Z/2
hopf_algebra()

Return self as a Hopf algebra.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: R.<x> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [x, x^2 - 7])
sage: B = FiniteFlatAlgebra(QQ, [x, x^2 + 21])
sage: Phi = Matrix(QQ, [[1/3,  2/3,   0],
....:                   [2/3, -2/3,   0],
....:                   [  0,    0, 14]])
sage: D = DualPair(A, B, Phi)
sage: D.hopf_algebra()
(Ring morphism:
   From: Finite flat algebra of degree 3 over Rational Field, product of:
 Number Field in a0 with defining polynomial x
 Number Field in a1 with defining polynomial x^2 - 7
   To:   Rational Field
   Defn: (1, 0) |--> 1
         (0, 1) |--> 0
         (0, a1) |--> 0,
 Ring morphism:
   From: Finite flat algebra of degree 3 over Rational Field, product of:
 Number Field in a0 with defining polynomial x
 Number Field in a1 with defining polynomial x^2 - 7
   To:   Finite flat algebra of degree 9 over Rational Field
   Defn: (1, 0) |--> e0 + 1/2*e4 - 1/14*e8
         (0, 1) |--> e1 + e3 + 1/2*e4 + 1/14*e8
         (0, a1) |--> e2 - 1/2*e5 + e6 - 1/2*e7)

sage: A = FiniteFlatAlgebra(QQ, [x, x^2 + x + 6])
sage: B = FiniteFlatAlgebra(QQ, [x, x^2 - x - 17])
sage: Phi = Matrix(QQ, [[ 1/3,  2/3,   1/3],
....:                   [ 2/3, -2/3,  -1/3],
....:                   [-1/3,  1/3, -34/3]])
sage: D = DualPair(A, B, Phi)
sage: D.hopf_algebra()
(Ring morphism:
   From: Finite flat algebra of degree 3 over Rational Field, product of:
 Number Field in a0 with defining polynomial x
 Number Field in a1 with defining polynomial x^2 + x + 6
   To:   Rational Field
   Defn: (1, 0) |--> 1
         (0, 1) |--> 0
         (0, a1) |--> 0,
 Ring morphism:
   From: Finite flat algebra of degree 3 over Rational Field, product of:
 Number Field in a0 with defining polynomial x
 Number Field in a1 with defining polynomial x^2 + x + 6
   To:   Finite flat algebra of degree 9 over Rational Field
   Defn: (1, 0) |--> e0 + 12/23*e4 + 1/23*e5 + 1/23*e7 + 2/23*e8
         (0, 1) |--> e1 + e3 + 11/23*e4 - 1/23*e5 - 1/23*e7 - 2/23*e8
         (0, a1) |--> e2 - 17/23*e4 - 11/23*e5 + e6 - 11/23*e7 + 1/23*e8)
is_isomorphic(other)

Return True if self is isomorphic to other.

is_valid()

Check whether self satisfies the definition of a dual pair of algebras.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: K.<a> = FunctionField(QQ)
sage: R.<x> = K[]
sage: A = FiniteFlatAlgebra(K, [x, x^2 - a])
sage: B = FiniteFlatAlgebra(K, [x, x^2 + 3*a])
sage: Phi = Matrix(K, [[1/3,  2/3,   0],
....:                  [2/3, -2/3,   0],
....:                  [  0,    0, 2*a]])
sage: D = DualPair(A, B, Phi)
sage: D.is_valid()
True

Sweedler’s Hopf algebra:

sage: m_A = [Matrix.identity(4),
....:        Matrix([[0, 1, 0, 0], [1, 0, 0, 0], [0, 0, 0, -1], [0, 0, -1, 0]]),
....:        Matrix([[0, 0, 1, 0], [0, 0, 0, 1], [0, 0, 0, 0], [0, 0, 0, 0]]),
....:        Matrix([[0, 0, 0, 1], [0, 0, 1, 0], [0, 0, 0, 0], [0, 0, 0, 0]])]
sage: m_B = [Matrix([[1, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 0]]),
....:        Matrix([[0, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 0], [0, 0, 0, 1]]),
....:        Matrix([[0, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 0], [0, 0, 0, 0]]),
....:        Matrix([[0, 0, 0, 1], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]])]
sage: A = FiniteFlatAlgebra(ZZ, m_A)
sage: B = FiniteFlatAlgebra(ZZ, m_B)
sage: Phi = Matrix.identity(4)
sage: D = DualPair(A, B, Phi)
sage: D.is_valid()
True
multiplication_by_m(m)

Return the multiplication-by-m map on self.

pairing(P, Q)

Return the image of (P, Q) under the Cartier duality pairing.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: R.<x> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [x, x, x^2 + 17])
sage: Phi = Matrix(QQ, [[1/4,  1/4,  1/2,   0],
....:                   [1/4,  1/4, -1/2,   0],
....:                   [1/2, -1/2,    0,   0],
....:                   [  0,    0,    0, -17]])
sage: D = DualPair(A, Phi)
sage: L.<a> = D.splitting_field()
sage: points = D.points(L)
sage: Matrix([[D.pairing(S, T) for S in points] for T in points])
[ 1  1  1  1]
[ 1  1 -1 -1]
[ 1 -1  1 -1]
[ 1 -1 -1  1]
phi()

Return the pairing matrix attached to self.

TESTS:

sage: K.<a> = FunctionField(QQ)
sage: R.<x> = K[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(K, [x, x^2 - a])
sage: B = FiniteFlatAlgebra(K, [x, x^2 + 3*a])
sage: Phi = Matrix(K, [[1/3,  2/3,   0],
....:                  [2/3, -2/3,   0],
....:                  [  0,    0, 2*a]])
sage: D = DualPair(A, B, Phi)
sage: D.phi() == Phi
True
points(R)

Return the group of points of self over R.

EXAMPLES:

sage: R.<x> = QQ[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(QQ, [x, x, x^2 + 17])
sage: Phi = Matrix(QQ, [[1/4,  1/4,  1/2,   0],
....:                   [1/4,  1/4, -1/2,   0],
....:                   [1/2, -1/2,    0,   0],
....:                   [  0,    0,    0, -17]])
sage: D = DualPair(A, Phi)
sage: D.points(QQ)
[(1, 0, 0, 0), (0, 1, 0, 0)]
sage: L.<a> = D.splitting_field()
sage: L
Number Field in a with defining polynomial x^2 + 17
sage: D.points(L)
[(1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, a), (0, 0, 1, -a)]
representation_table(L=None, basis=None)

Return the representation table of self.

EXAMPLES:

sage: R.<x> = QQ[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(QQ, [x, x, x^2 + 17])
sage: Phi = Matrix(QQ, [[1/4,  1/4,  1/2,   0],
....:                   [1/4,  1/4, -1/2,   0],
....:                   [1/2, -1/2,    0,   0],
....:                   [  0,    0,    0, -17]])
sage: D = DualPair(A, Phi)
sage: D.representation_table()
{Ring endomorphism of Number Field in z with defining polynomial x^2 + 17
 Defn: z |--> -z: [1 1]
                  [0 1],
 Ring endomorphism of Number Field in z with defining polynomial x^2 + 17
 Defn: z |--> z: [1 0]
                 [0 1]}

sage: R.<t> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [t, t^3 - t + 1])
sage: phi = 1/4*Matrix([[1,  3, 0,  2],
....:                   [3, -3, 0, -2],
....:                   [0,  0, 4, -6],
....:                   [2, -2, -6, 0]])
sage: D = DualPair(A, phi)
sage: L.<z> = NumberField(x^6 + 7*x^4 + 18*x^2 + 23)
sage: table = D.representation_table(L)
sage: {f(z): m for f, m in table.items()}
{z: [1 0]
    [0 1],
 -z: [1 1]
     [0 1],
 -1/14*z^5 - 1/14*z^4 - 4/7*z^3 - 1/14*z^2 - 13/7*z + 1/7: [1 0]
                                                           [1 1],
 -1/14*z^5 + 1/14*z^4 - 4/7*z^3 + 1/14*z^2 - 13/7*z - 1/7: [0 1]
                                                           [1 0],
 1/14*z^5 - 1/14*z^4 + 4/7*z^3 - 1/14*z^2 + 13/7*z + 1/7: [0 1]
                                                          [1 1],
 1/14*z^5 + 1/14*z^4 + 4/7*z^3 + 1/14*z^2 + 13/7*z - 1/7: [1 1]
                                                          [1 0]}
splitting_field(names)

Return a splitting field for self.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: F = GF(23)
sage: R.<x> = F[]
sage: A = FiniteFlatAlgebra(F, [x, x^2 - 7])
sage: B = FiniteFlatAlgebra(F, [x, x^2 + 21])
sage: Phi = Matrix(F, [[1/3,  2/3,   0],
....:                  [2/3, -2/3,   0],
....:                  [  0,    0, 14]])
sage: D = DualPair(A, B, Phi)
sage: D.splitting_field('a')
Finite Field in a of size 23^2
splitting_field_polynomial()

Return a defining polynomial for the splitting field of self.

TESTS:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: F = GF(19)
sage: R.<x> = F[]
sage: A = FiniteFlatAlgebra(F, [x, x, x^2 + 17])
sage: Phi = Matrix(F, [[1/4,  1/4,  1/2,   0],
....:                  [1/4,  1/4, -1/2,   0],
....:                  [1/2, -1/2,    0,   0],
....:                  [  0,    0,    0, -17]])
sage: D = DualPair(A, Phi)
sage: D.splitting_field_polynomial()
Traceback (most recent call last):
...
PariError: incorrect type in nfsplitting [not in Z[X]] (t_POL)
theta(R=None)

Return the canonical root of unity attached to self.

INPUT:

  • R – an extension of the base ring of self (default: the base ring itself)

OUTPUT:

The canonical root of unity \(\theta \in A_R\otimes_R B_R\), where A and B are the two algebras defining self.

EXAMPLES:

sage: R.<x> = QQ[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(QQ, [x, x, x^2 + 17])
sage: Phi = Matrix(QQ, [[1/4,  1/4,  1/2,   0],
....:                   [1/4,  1/4, -1/2,   0],
....:                   [1/2, -1/2,    0,   0],
....:                   [  0,    0,    0, -17]])
sage: D = DualPair(A, Phi)
sage: D.theta()
[    1     1     1     0]
[    1     1    -1     0]
[    1    -1     0     0]
[    0     0     0 -1/17]

Note

Base extension of theta to a given ring R can be quite slow, for example when R is a ramified p-adic field. We therefore cache the result for any R.

trivial_torsor()

Return a trivial torsor under self.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: R.<x> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [x, x, x^2 + 17])
sage: Phi = Matrix(QQ, [[1/4,  1/4,  1/2,   0],
....:                   [1/4,  1/4, -1/2,   0],
....:                   [1/2, -1/2,    0,   0],
....:                   [  0,    0,    0, -17]])
sage: D = DualPair(A, Phi)
sage: D.trivial_torsor()
Torsor for Dual pair of algebras over Rational Field
A = Finite flat algebra of degree 4 over Rational Field, product of:
Number Field in a0 with defining polynomial x
Number Field in a1 with defining polynomial x
Number Field in a2 with defining polynomial x^2 + 17
B = Finite flat algebra of degree 4 over Rational Field, product of:
Number Field in a0 with defining polynomial x
Number Field in a1 with defining polynomial x
Number Field in a2 with defining polynomial x^2 + 17
T = Finite flat algebra of degree 4 over Rational Field, product of:
Number Field in a0 with defining polynomial x
Number Field in a1 with defining polynomial x
Number Field in a2 with defining polynomial x^2 + 17
unit1()

Return the unit element of the algebra A as an element of the underlying module.

EXAMPLES:

sage: K.<a> = FunctionField(QQ)
sage: R.<x> = K[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(K, [x, x^2 - a])
sage: B = FiniteFlatAlgebra(K, [x, x^2 + 3*a])
sage: Phi = Matrix(K, [[1/3,  2/3,   0],
....:                  [2/3, -2/3,   0],
....:                  [  0,    0, 2*a]])
sage: D = DualPair(A, B, Phi)
sage: D.unit1()
(1, 1, 0)
unit2()

Return the unit element of the algebra B as an element of the underlying module.

EXAMPLES:

sage: K.<a> = FunctionField(QQ)
sage: R.<x> = K[]
sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: A = FiniteFlatAlgebra(K, [x, x^2 - a])
sage: B = FiniteFlatAlgebra(K, [x, x^2 + 3*a])
sage: Phi = Matrix(K, [[1/3,  2/3,   0],
....:                  [2/3, -2/3,   0],
....:                  [  0,    0, 2*a]])
sage: D = DualPair(A, B, Phi)
sage: D.unit2()
(1, 1, 0)
weight()

Return the Serre weight of self.

EXAMPLES:

sage: from dual_pairs import FiniteFlatAlgebra, DualPair
sage: R.<t> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [t, t^3 - t + 1])
sage: phi = 1/4*Matrix([[1,  3, 0,  2],
....:                   [3, -3, 0, -2],
....:                   [0,  0, 4, -6],
....:                   [2, -2, -6, 0]])
sage: D = DualPair(A, phi)
sage: D.weight()
1

sage: R.<x> = QQ[]
sage: A = FiniteFlatAlgebra(QQ, [x, x, x^2 + 17])
sage: Phi = Matrix(QQ, [[1/4,  1/4,  1/2,   0],
....:                   [1/4,  1/4, -1/2,   0],
....:                   [1/2, -1/2,    0,   0],
....:                   [  0,    0,    0, -17]])
sage: D = DualPair(A, Phi)
sage: D.weight()
2

sage: D = DualPair(QQ, [[t, t^3 - 2]], [[1/4, 3/4, 0, 0], [3/4, -3/4, 0, 0], [0, 0, 0, 3], [0, 0, 3, 0]])
sage: D.weight()
2

sage: D = DualPair(QQ, [[t, t^8 - 4*t^7 + 10*t^6 - 16*t^5 + 16*t^4 - 4*t^3 - 14*t^2 + 20*t - 11], [[1], [1, 3/23*t^7 - 20/23*t^6 + 45/23*t^5 - 76/23*t^4 + 59/23*t^3 + 7/23*t^2 - 99/23*t + 94/23, -1/23*t^7 - 1/23*t^6 + 8/23*t^5 - 13/23*t^4 + 34/23*t^3 - 10/23*t^2 - 13/23*t + 30/23, -4/23*t^7 - 4/23*t^6 + 9/23*t^5 - 29/23*t^4 + 44/23*t^3 - 17/23*t^2 - 29/23*t + 74/23, t - 1, 15/23*t^7 - 54/23*t^6 + 110/23*t^5 - 150/23*t^4 + 88/23*t^3 + 81/23*t^2 - 219/23*t + 148/23, -4/23*t^7 + 19/23*t^6 - 37/23*t^5 + 63/23*t^4 - 48/23*t^3 + 6/23*t^2 + 63/23*t - 41/23, 18/23*t^7 - 51/23*t^6 + 109/23*t^5 - 134/23*t^4 + 78/23*t^3 + 65/23*t^2 - 180/23*t + 81/23]]], [[1/9, 8/9, 0, -4/9, 4/9, -4/9, 4/9, 4/9, -4/9], [8/9, -8/9, 0, 4/9, -4/9, 4/9, -4/9, -4/9, 4/9], [0, 0, 0, 0, 0, 0, 0, 0, -4], [-4/9, 4/9, 0, 16/9, 20/9, 16/9, 20/9, 20/9, 16/9], [4/9, -4/9, 0, 20/9, 16/9, -16/9, 16/9, -20/9, 20/9], [-4/9, 4/9, 0, -20/9, -16/9, -20/9, 20/9, -16/9, 16/9], [4/9, -4/9, 0, 20/9, 16/9, -16/9, 16/9, 16/9, -16/9], [4/9, -4/9, 0, 20/9, -20/9, -16/9, 16/9, 16/9, 20/9], [-4/9, 4/9, 4, -20/9, 20/9, 16/9, 20/9, 20/9, -20/9]])
sage: D.weight()  # long time (14 s)
2