Environment to perform calculations of equivariant vector bundles on homogeneous varieties
Equivariant_Vector_Bundles_On_Homogeneous_Varieties__0-2 / src / Equivariant_Vector_Bundles_On_Homogeneous_Varieties / Base_Space / Orthogonal_Grassmannian.sage
1842 viewsLicense: GPL3
ubuntu2204
from typing import Iterator1from Equivariant_Vector_Bundles_On_Homogeneous_Varieties.Base_Space.Homogeneous_Variety import Irreducible_Homogeneous_Variety2345class Orthogonal_Grassmannian ( Irreducible_Homogeneous_Variety ) :67def __init__( self , k :int , N :int ) -> None :8"""9Initialize the Grassmannian OGr(k,N).1011INPUT:12- ``k`` -- Integer ;13- ``N`` -- Integer ;1415OUTPUT: None.16"""17assert isinstance( N , Integer ) , \18TypeError('The input for `N` must be an integer.')19assert 5 <= N , \20ValueError('The integer `N` must be equal to or greater than 5.')2122assert isinstance( k , Integer ) , \23TypeError('The input for `k` must be an integer.')24assert k in [ 1 .. floor(N/2) ] , \25ValueError('The integer `k` need to be in the range '+str([ 1 .. floor(N/2) ])+'.')2627from Equivariant_Vector_Bundles_On_Homogeneous_Varieties.Base_Space.Homogeneous_Variety import Irreducible_Cartan_Group28if N % 2 == 0 :29G = Irreducible_Cartan_Group( Cartan_Family='D' , Cartan_Degree=N/2 )30if k in [ 1 .. N/2-2 ] : P = G.Maximal_Parabolic_Subgroup( Excluded_Node=k )31elif k == N/2-1 : P = G.Parabolic_Subgroup( Excluded_Nodes={N/2-1,N/2} )32elif k == N/2 : P = G.Maximal_Parabolic_Subgroup( Excluded_Node=N/2-1 )33else :34G = Irreducible_Cartan_Group( Cartan_Family='B' , Cartan_Degree=floor(N/2) )35P = G.Maximal_Parabolic_Subgroup( Excluded_Node=k )3637super( Orthogonal_Grassmannian , self ).__init__( P )383940def __repr__ ( self ) -> tuple[ int ] :41"""Returns all attributes which are necessary to initialize the object."""42return self.k() , self.N()434445def __str__ ( self , Output_Style='Long' ) -> str :46"""Returns a one-line string as short description."""47if Output_Style == 'Short' : return 'OGr('+str(self.k())+';'+str(self.N())+')'48elif Output_Style == 'Long' : return 'Orthogonal grassmannian variety of '+str(self.k())+'-dimensional isotropic linear subspaces' + \49' in a '+str(self.N())+'-dimensional ambient vector space.'50else : raise ValueError('The input for ``Output_Style`` is inappropriate.')515253# Synonym for the method ``Spinor_Bundle``54def calS ( self ) -> "Irreducible_Equivariant_Vector_Bundle" :55"""Returns the spinor bundle ."""56return self.Spinor_Bundle()575859def Fano_Index ( self ) -> int :60"""Returns the Fano index of ``self``."""61for Node , Fano_Index in super( Orthogonal_Grassmannian , self ).Fano_Index() :62if Node == self.k() : return Fano_Index63raise ValueError('PROBLEM! We could not compute the Fano index.')646566def My_Collection ( self , Modus :str ='Consecutive' , Parts :list =[1,2] ) -> "Lefschetz_Collection" :67assert isinstance( Modus , str ) , \68'The input for `Modus` need to be a string.'6970if Modus in [ 'Consecutive' , 'Con' ] :71ConLC = self.Lefschetz_Collection( Starting_Block=[] )72ConLC += self.Tautological_Collection( Parts=Parts )73ConLC += self.Spinor_Collection()74return ConLC7576elif Modus in [ 'Alternating' , 'Alt' ] :77ConLC = self.My_Collection( Modus='Consecutive' , Parts=Parts )78Stock = dict({})79for ColumnCounter in range(ConLC.Width()) :80Orbit = ConLC.Subcollection( Columns=[ColumnCounter] )81d = max([ Summand.Highest_Weight().to_ambient()[0] for Summand in Orbit[0].Irreducible_Components() ])82if not d in Stock.keys() : Stock.update({ d : self.Lefschetz_Collection( Starting_Block=[] ) })83Stock[d] += Orbit84AltLC = self.Lefschetz_Collection( Starting_Block=[] )85for d , Part in sorted(Stock.items()) :86AltLC += Part87return AltLC8889else :90raise ValueError( 'The input for `Modus` is unknown.' )919293def Spinor_Bundle ( self , Parity : int or str or None =None ) -> "Irreducible_Equivariant_Vector_Bundle" :94"""Returns the spinor bundle."""95Cartan_Family = self.Cartan_Family()96n = self.Cartan_Degree()97fw = self.Basis('fw')98if Cartan_Family == 'B' :99return self.calU( fw[n] )100101elif Cartan_Family == 'D' :102if Parity in [ 1 , '+' ] : return self.calU( fw[n-1] )103elif Parity in [ -1 , '-' ] : return self.calU( fw[n] )104else : raise ValueError('For the Cartan Family D, there need to be a parity `+` or `-`.')105106else :107raise ValueError('Conflict! There are only spinor bundles for Cartan families B_n and D_n respectively.')108109110def Spinor_Collection ( self ) -> "Lefschetz_Collection" :111Cartan_Family = self.Parent_Group().Cartan_Family()112n = self.Parent_Group().Cartan_Degree()113k = self.k()114fw = self.Basis('fw')115LC = self.Lefschetz_Collection( Starting_Block=[] , Support_Pattern='Trivial' )116if Cartan_Family == 'B' :117Starting_Block = []118if k == 1 :119Starting_Block = [ self.calU( fw[n] ) ]120Support_Partition = tuple( [ 1 ] )121LC += self.Lefschetz_Collection( Starting_Block=Starting_Block , Support_Pattern=Support_Partition )122123elif k == 2 :124if n == 2 :125pass126127else :128Starting_Block = [ self.calU( fw[n] ) ]129Support_Partition = tuple( (2*n-2)*[ 1 ] )130LC += self.Lefschetz_Collection( Starting_Block=Starting_Block , Support_Pattern=Support_Partition )131132elif 3 <= k :133if k < n : Starting_Block += [ self.calU(fw[n]) ]134Starting_Block += [ self.calU( Degree*fw[1]+fw[n] ).Extend_Equivariantly_By( self.calU( (Degree-1)*fw[1]+fw[n] ) )135for Degree in range(1,n-k+1)136]137Support_Partition = tuple( self.Fano_Index()*[ len(Starting_Block) ] )138LC += self.Lefschetz_Collection( Starting_Block=Starting_Block , Support_Pattern=Support_Partition )139140if k == 3 :141if n == 3 :142Starting_Block = [ self.calU( fw[1] ).Extend_Equivariantly_By( self.calO() ) ]143Support_Partition = tuple( 2*[ 1 ] )144else :145Starting_Block = [ self.calU( (n-2)*fw[1]+fw[n] ).Extend_Equivariantly_By( self.calU( (n-3)*fw[1]+fw[n] ) ) ]146Support_Partition = tuple( (n-2)*[ 1 ] )147LC += self.Lefschetz_Collection( Starting_Block=Starting_Block , Support_Pattern=Support_Partition )148149elif Cartan_Family == 'D' :150pass151152return LC153154155def Spinor_Filtration ( self , Parity :str or None =None , Factor :"Equivariant_Vector_Bundle" or None =None ) -> Iterator[ str ] :156"""157Returns the filtration on the spinor bundle.158159REFERENCE:160- [Kuz08a] Kuznetsov, Alexander: Exceptional collections for Grassmannians of isotropic lines.161"""162if Factor == None : Factor = self.calO()163assert isinstance( Factor , Equivariant_Vector_Bundle ) , \164'The input for `Factor` need to be an equivariant vector bundle.'165Cartan_Family = self.Cartan_Family()166n = self.Cartan_Degree()167k = self.k()168fw = self.Basis('fw')169if Cartan_Family == 'B' :170calS = self.calS()171calU = self.calU()172yield 'F_'+str(k+1)+' = 0'173for i in range( k , -1 , -1 ) :174Quotient = str( calS * calU.Exterior_Power(i) * Factor )175yield '0 --> F_'+str(i+1)+' --> F_'+str(i)+' --> '+str(Quotient)+' --> 0'176yield 'F_0 = '+str( Factor.Multiply_By( calS.H0() ) )177178elif Cartan_Family == 'D' :179if Parity in [ 1 , '+' ] : ParityStr = '+' ; ParityInt = 1180elif Parity in [ -1 , '-' ] : ParityStr = '-' ; ParityInt = -1181else : raise ValueError('For the Cartan Family D, there need to be a parity in '+str([ 1 , '+' ])+' or in '+str([ -1 , '-' ])+'.')182yield 'F^'+ParityStr+'_'+str(k+1)+' = 0'183for i in range( k , -1 , -1 ) :184Quotient = str( self.calS( ParityInt * (-1)^i ) * calU.Exterior_Power(i) * Factor )185yield '0 --> F^'+ParityStr+'_'+str(i+1)+' --> F^'+ParityStr+'_'+str(i)+' --> '+str(Quotient)+' --> 0'186yield 'F_0 = '+str( Factor.Multiply_By( self.calS(Parity).H0() ) )187188else :189raise ValueError('Conflict! There are only spinor bundles for Cartan families B_n and D_n respectively.')190191192def Tautological_Collection ( self , Parts :list =[1,2] ) -> "Lefschetz_Collection" :193n = self.Parent_Group().Cartan_Degree()194k = self.k()195fw = self.Basis('fw')196197assert isinstance( Parts , list ) , \198'The input for ``Parts`` need to be a list.'199200Universe = []201# Initialise part 2 (if desired)202if 2 in Parts :203if k == 3 :204for Partition in IntegerListsLex( length=3 , \205floor=[ n-2 , 0 , 0 ] , ceiling=[ floor(3/2*(n-3)) , ceil(1/2*(n-3)) , 0 ] , \206#max_sum=sum([ (k-i)*(n-k) for i in [ 1 .. k-1 ] ]) ,207min_slope=-n+3 , max_slope=0 \208) :209Partition = list(Partition)210Universe += [ [ Partition[Counter-1]-Partition[Counter] for Counter in range( 1 , len(Partition) ) ] ]211212# Initialise part 1 (if desired)213if 1 in Parts :214for Partition in IntegerListsLex( length=k , ceiling=(k-1)*[n-k]+[0] , max_slope=0 ) :215Partition = list(Partition)216Universe += [ [ Partition[Counter-1]-Partition[Counter] for Counter in range( 1 , len(Partition) ) ] ]217218Universe.reverse()219Starting_Block = [ self.calU( sum([ self.Null_Weight() ] + [ Coefficient*fw[Node] for Node , Coefficient in enumerate( Coefficients , start=1 ) ]) )220for Coefficients in Universe221]222Support_Partition = self.Fano_Index() * [ len(Starting_Block) ]223return self.Lefschetz_Collection( Starting_Block=Starting_Block , Support_Pattern=Support_Partition )224225226227class Quadric_Space ( Orthogonal_Grassmannian ) :228229def __init__( self , Dimension :int ) -> None :230"""231Initialize the quadratic space of a given dimension.232233INPUT:234- ``Dimension`` -- Integer ;235236OUTPUT: None.237"""238assert isinstance( Dimension , Integer ) , \239TypeError('The input for `Dimension` must be an integer.')240assert 0 < Dimension , \241ValueError('The dimension must be greater than zero.')242243super( Quadric_Space , self ).__init__( k=1 , N=Dimension+2 )244245246def __repr__ ( self ) -> int :247"""Returns all attributes which are necessary to initialize the object."""248return self.Dimension()249250251def __str__ ( self , Output_Style='Long' ) -> str :252"""Returns a one-line string as short description."""253if Output_Style == 'Short' : return 'Q^'+str(self.Dimension())254elif Output_Style == 'Long' : return 'Quadric space of dimension '+str(self.Dimension())+'.'255else : raise ValueError('The input for ``Output_Style`` is inappropriate.')256257