예제 #1
0
    def xi(self, A):
        r""" The eight-root of unity in front of the Weil representation.

        INPUT:
        
        -''N'' -- integer
        -''A'' -- element of PSL(2,Z)

        EXAMPLES::

        
            sage: A=SL2Z([41,77,33,62])
            sage: WR.xi(A)
            -zeta8^3]
            sage: S,T=SL2Z.gens()
            sage: WR.xi(S)
            -zeta8^3
            sage: WR.xi(T)
            1
            sage: A=SL2Z([-1,1,-4,3])
            sage: WR.xi(A)
            -zeta8^2
            sage: A=SL2Z([0,1,-1,0])
            sage: WR.xi(A)
            -zeta8

        """
        a = Integer(A[0, 0])
        b = Integer(A[0, 1])
        c = Integer(A[1, 0])
        d = Integer(A[1, 1])
        if (c == 0):
            return 1
        z = CyclotomicField(8).gen()
        N = self._N
        N2 = odd_part(N)
        Neven = ZZ(2 * N).divide_knowing_divisible_by(N2)
        c2 = odd_part(c)
        Nc = gcd(Integer(2 * N), Integer(c))
        cNc = ZZ(c).divide_knowing_divisible_by(Nc)
        f1 = kronecker(-a, cNc)
        f2 = kronecker(cNc, ZZ(2 * N).divide_knowing_divisible_by(Nc))
        if (is_odd(c)):
            s = c * N2
        elif (c % Neven == 0):
            s = (c2 + 1 - N2) * (a + 1)
        else:
            s = (c2 + 1 - N2) * (a + 1) - N2 * a * c2
        r = -1 - QQ(N2) / QQ(gcd(c, N2)) + s
        xi = f1 * f2 * z**r
        return xi
예제 #2
0
    def xi(self,A):
        r""" The eight-root of unity in front of the Weil representation.

        INPUT:
        
        -''N'' -- integer
        -''A'' -- element of PSL(2,Z)

        EXAMPLES::

        
            sage: A=SL2Z([41,77,33,62])
            sage: WR.xi(A)
            -zeta8^3]
            sage: S,T=SL2Z.gens()
            sage: WR.xi(S)
            -zeta8^3
            sage: WR.xi(T)
            1
            sage: A=SL2Z([-1,1,-4,3])
            sage: WR.xi(A)
            -zeta8^2
            sage: A=SL2Z([0,1,-1,0])
            sage: WR.xi(A)
            -zeta8

        """
        a=Integer(A[0,0]); b=Integer(A[0,1])
        c=Integer(A[1,0]); d=Integer(A[1,1])
        if(c==0):
            return 1
        z=CyclotomicField(8).gen()    
        N=self._N
        N2=odd_part(N)
        Neven=ZZ(2*N).divide_knowing_divisible_by(N2)
        c2=odd_part(c)
        Nc=gcd(Integer(2*N),Integer(c))
        cNc=ZZ(c).divide_knowing_divisible_by(Nc)
        f1=kronecker(-a,cNc)
        f2=kronecker(cNc,ZZ(2*N).divide_knowing_divisible_by(Nc))
        if(is_odd(c)):
            s=c*N2
        elif( c % Neven == 0):
            s=(c2+1-N2)*(a+1)
        else:
            s=(c2+1-N2)*(a+1)-N2*a*c2
        r=-1-QQ(N2)/QQ(gcd(c,N2))+s
        xi=f1*f2*z**r
        return xi
예제 #3
0
 def _dimension_formula(self,k,eps=1,cuspidal=1):
     ep = 0
     N = self._N
     if (2*k) % 4 == 1: ep = 1
     if (2*k) % 4 == 3: ep = -1
     if ep==0: return 0,0
     if eps==-1:
         ep = -ep
     twok = ZZ(2*k)
     K0 = 1
     sqf = ZZ(N).divide_knowing_divisible_by(squarefree_part(N))
     if sqf>12:
         b2 = max(sqf.divisors())
     else:
         b2 = 1
     b = sqrt(b2)
     if ep==1:
         K0 = floor(QQ(b+2)/QQ(2))
     else:
         # print "b=",b
         K0 = floor(QQ(b-1)/QQ(2))
     if is_even(N):
         e2 = ep*kronecker(2,twok)/QQ(4)
     else:
         e2 = 0
     N2 = odd_part(N)
     N22 = ZZ(N).divide_knowing_divisible_by(N2)
     k3 = kronecker(3,twok)
     if gcd(3,N)>1:
         if eps==1:
             e3 = -ep*kronecker(-3,4*k+ep-1)/QQ(3)
         else:
             e3 = -1*ep*kronecker(-3,4*k+ep+1)/QQ(3)
         #e3 = -1/3*ep
     else:
         f1 = kronecker(3,2*N22)*kronecker(-12,N2) - ep
         f2 = kronecker(-3,twok+1)
         e3 = f1*f2/QQ(6)
     ID = QQ(N+ep)*(k-1)/QQ(12)
     P = 0
     for d in ZZ(4*N).divisors():
         dm4=d % 4
         if dm4== 2 or dm4 == 1:
             h = 0
         elif d == 3:
             h = QQ(1)/QQ(3)
         elif d == 4:
             h = QQ(1)/QQ(2)
         else:
             h = class_nr_pos_def_qf(-d)
         if self._verbose>1:
             print "h({0})={1}".format(d,h)
         if h<>0:
             P= P + h
     P = QQ(P)/QQ(4)
     if self._verbose>0:
         print "P=",P
     P=P + QQ(ep)*kronecker(-4,N)/QQ(8)
     if eps==-1:
         P = -P
     if self._verbose>0:
         print "P=",P
     # P = -2*N**2 + N*(twok+10-ep*3) +(twok+10)*ep-1
     if self._verbose>0:
         print "ID=",ID
     P =  P - QQ(1)/QQ(2*K0)
     # P = QQ(P)/QQ(24) - K0
     # P = P - K0
     res = ID + P + e2 + e3
     if self._verbose>1:
         print "twok=",twok
         print "K0=",K0
         print "ep=",ep
         print "e2=",e2
         print "e3=",e3
         print "P=",P
     if cuspidal==0:
         res = res + K0
     return res   #,ep
예제 #4
0
 def _dimension_formula(self,k,eps=1,cuspidal=1):
     ep = 0
     N = self._N
     if (2*k) % 4 == 1: ep = 1
     if (2*k) % 4 == 3: ep = -1
     if ep==0: return 0,0
     if eps==-1:
         ep = -ep
     twok = ZZ(2*k)
     K0 = 1
     sqf = ZZ(N).divide_knowing_divisible_by(squarefree_part(N))
     if sqf>12:
         b2 = max(sqf.divisors())
     else:
         b2 = 1
     b = sqrt(b2)
     if ep==1:
         K0 = floor(QQ(b+2)/QQ(2))
     else:
         # print "b=",b
         K0 = floor(QQ(b-1)/QQ(2))
     if is_even(N):
         e2 = ep*kronecker(2,twok)/QQ(4)
     else:
         e2 = 0
     N2 = odd_part(N)
     N22 = ZZ(N).divide_knowing_divisible_by(N2)
     k3 = kronecker(3,twok)
     if gcd(3,N)>1:
         if eps==1:
             e3 = -ep*kronecker(-3,4*k+ep-1)/QQ(3)
         else:
             e3 = -1*ep*kronecker(-3,4*k+ep+1)/QQ(3)
         #e3 = -1/3*ep
     else:
         f1 = kronecker(3,2*N22)*kronecker(-12,N2) - ep
         f2 = kronecker(-3,twok+1)
         e3 = f1*f2/QQ(6)
     ID = QQ(N+ep)*(k-1)/QQ(12)
     P = 0
     for d in ZZ(4*N).divisors():
         dm4=d % 4
         if dm4== 2 or dm4 == 1:
             h = 0
         elif d == 3:
             h = QQ(1)/QQ(3)
         elif d == 4:
             h = QQ(1)/QQ(2)
         else:
             h = class_nr_pos_def_qf(-d)
         if self._verbose>1:
             print("h({0})={1}".format(d,h))
         if h!=0:
             P= P + h
     P = QQ(P)/QQ(4)
     if self._verbose>0:
         print("P={0}".format(P))
     P=P + QQ(ep)*kronecker(-4,N)/QQ(8)
     if eps==-1:
         P = -P
     if self._verbose>0:
         print("P={0}".format(P))
     # P = -2*N**2 + N*(twok+10-ep*3) +(twok+10)*ep-1
     if self._verbose>0:
         print("ID={0}".format(ID))
     P =  P - QQ(1)/QQ(2*K0)
     # P = QQ(P)/QQ(24) - K0
     # P = P - K0
     res = ID + P + e2 + e3
     if self._verbose>1:
         print("twok={0}".format(twok))
         print("K0={0}".format(K0))
         print("ep={0}".format(ep))
         print("e2={0}".format(e2))
         print("e3={0}".format(e3))
         print("P={0}".format(P))
     if cuspidal==0:
         res = res + K0
     return res   #,ep