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.py
1842 viewsLicense: GPL3
ubuntu2204
12# This file was *autogenerated* from the file Orthogonal_Grassmannian.sage3from sage.all_cmdline import * # import sage library45_sage_const_5 = Integer(5); _sage_const_1 = Integer(1); _sage_const_2 = Integer(2); _sage_const_0 = Integer(0); _sage_const_3 = Integer(3)6from typing import Iterator7from Equivariant_Vector_Bundles_On_Homogeneous_Varieties.Base_Space.Homogeneous_Variety import Irreducible_Homogeneous_Variety891011class Orthogonal_Grassmannian ( Irreducible_Homogeneous_Variety ) :1213def __init__( self , k :int , N :int ) -> None :14"""15Initialize the Grassmannian OGr(k,N).1617INPUT:18- ``k`` -- Integer ;19- ``N`` -- Integer ;2021OUTPUT: None.22"""23assert isinstance( N , Integer ) , TypeError('The input for `N` must be an integer.')24assert _sage_const_5 <= N , ValueError('The integer `N` must be equal to or greater than 5.')2526assert isinstance( k , Integer ) , TypeError('The input for `k` must be an integer.')27assert k in (ellipsis_range( _sage_const_1 ,Ellipsis, floor(N/_sage_const_2 ) )) , ValueError('The integer `k` need to be in the range '+str((ellipsis_range( _sage_const_1 ,Ellipsis, floor(N/_sage_const_2 ) )))+'.')2829from Equivariant_Vector_Bundles_On_Homogeneous_Varieties.Base_Space.Homogeneous_Variety import Irreducible_Cartan_Group30if N % _sage_const_2 == _sage_const_0 :31G = Irreducible_Cartan_Group( Cartan_Family='D' , Cartan_Degree=N/_sage_const_2 )32if k in (ellipsis_range( _sage_const_1 ,Ellipsis, N/_sage_const_2 -_sage_const_2 )) : P = G.Maximal_Parabolic_Subgroup( Excluded_Node=k )33elif k == N/_sage_const_2 -_sage_const_1 : P = G.Parabolic_Subgroup( Excluded_Nodes={N/_sage_const_2 -_sage_const_1 ,N/_sage_const_2 } )34elif k == N/_sage_const_2 : P = G.Maximal_Parabolic_Subgroup( Excluded_Node=N/_sage_const_2 -_sage_const_1 )35else :36G = Irreducible_Cartan_Group( Cartan_Family='B' , Cartan_Degree=floor(N/_sage_const_2 ) )37P = G.Maximal_Parabolic_Subgroup( Excluded_Node=k )3839super( Orthogonal_Grassmannian , self ).__init__( P )404142def __repr__ ( self ) -> tuple[ int ] :43"""Returns all attributes which are necessary to initialize the object."""44return self.k() , self.N()454647def __str__ ( self , Output_Style='Long' ) -> str :48"""Returns a one-line string as short description."""49if Output_Style == 'Short' : return 'OGr('+str(self.k())+';'+str(self.N())+')'50elif Output_Style == 'Long' : return 'Orthogonal grassmannian variety of '+str(self.k())+'-dimensional isotropic linear subspaces' + ' in a '+str(self.N())+'-dimensional ambient vector space.'51else : raise ValueError('The input for ``Output_Style`` is inappropriate.')525354# Synonym for the method ``Spinor_Bundle``55def calS ( self ) -> "Irreducible_Equivariant_Vector_Bundle" :56"""Returns the spinor bundle ."""57return self.Spinor_Bundle()585960def Fano_Index ( self ) -> int :61"""Returns the Fano index of ``self``."""62for Node , Fano_Index in super( Orthogonal_Grassmannian , self ).Fano_Index() :63if Node == self.k() : return Fano_Index64raise ValueError('PROBLEM! We could not compute the Fano index.')656667def My_Collection ( self , Modus :str ='Consecutive' , Parts :list =[_sage_const_1 ,_sage_const_2 ] ) -> "Lefschetz_Collection" :68assert isinstance( Modus , str ) , '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()[_sage_const_0 ] for Summand in Orbit[_sage_const_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 [ _sage_const_1 , '+' ] : return self.calU( fw[n-_sage_const_1 ] )103elif Parity in [ -_sage_const_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 == _sage_const_1 :119Starting_Block = [ self.calU( fw[n] ) ]120Support_Partition = tuple( [ _sage_const_1 ] )121LC += self.Lefschetz_Collection( Starting_Block=Starting_Block , Support_Pattern=Support_Partition )122123elif k == _sage_const_2 :124if n == _sage_const_2 :125pass126127else :128Starting_Block = [ self.calU( fw[n] ) ]129Support_Partition = tuple( (_sage_const_2 *n-_sage_const_2 )*[ _sage_const_1 ] )130LC += self.Lefschetz_Collection( Starting_Block=Starting_Block , Support_Pattern=Support_Partition )131132elif _sage_const_3 <= k :133if k < n : Starting_Block += [ self.calU(fw[n]) ]134Starting_Block += [ self.calU( Degree*fw[_sage_const_1 ]+fw[n] ).Extend_Equivariantly_By( self.calU( (Degree-_sage_const_1 )*fw[_sage_const_1 ]+fw[n] ) )135for Degree in range(_sage_const_1 ,n-k+_sage_const_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 == _sage_const_3 :141if n == _sage_const_3 :142Starting_Block = [ self.calU( fw[_sage_const_1 ] ).Extend_Equivariantly_By( self.calO() ) ]143Support_Partition = tuple( _sage_const_2 *[ _sage_const_1 ] )144else :145Starting_Block = [ self.calU( (n-_sage_const_2 )*fw[_sage_const_1 ]+fw[n] ).Extend_Equivariantly_By( self.calU( (n-_sage_const_3 )*fw[_sage_const_1 ]+fw[n] ) ) ]146Support_Partition = tuple( (n-_sage_const_2 )*[ _sage_const_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 ) , 'The input for `Factor` need to be an equivariant vector bundle.'164Cartan_Family = self.Cartan_Family()165n = self.Cartan_Degree()166k = self.k()167fw = self.Basis('fw')168if Cartan_Family == 'B' :169calS = self.calS()170calU = self.calU()171yield 'F_'+str(k+_sage_const_1 )+' = 0'172for i in range( k , -_sage_const_1 , -_sage_const_1 ) :173Quotient = str( calS * calU.Exterior_Power(i) * Factor )174yield '0 --> F_'+str(i+_sage_const_1 )+' --> F_'+str(i)+' --> '+str(Quotient)+' --> 0'175yield 'F_0 = '+str( Factor.Multiply_By( calS.H0() ) )176177elif Cartan_Family == 'D' :178if Parity in [ _sage_const_1 , '+' ] : ParityStr = '+' ; ParityInt = _sage_const_1179elif Parity in [ -_sage_const_1 , '-' ] : ParityStr = '-' ; ParityInt = -_sage_const_1180else : raise ValueError('For the Cartan Family D, there need to be a parity in '+str([ _sage_const_1 , '+' ])+' or in '+str([ -_sage_const_1 , '-' ])+'.')181yield 'F^'+ParityStr+'_'+str(k+_sage_const_1 )+' = 0'182for i in range( k , -_sage_const_1 , -_sage_const_1 ) :183Quotient = str( self.calS( ParityInt * (-_sage_const_1 )**i ) * calU.Exterior_Power(i) * Factor )184yield '0 --> F^'+ParityStr+'_'+str(i+_sage_const_1 )+' --> F^'+ParityStr+'_'+str(i)+' --> '+str(Quotient)+' --> 0'185yield 'F_0 = '+str( Factor.Multiply_By( self.calS(Parity).H0() ) )186187else :188raise ValueError('Conflict! There are only spinor bundles for Cartan families B_n and D_n respectively.')189190191def Tautological_Collection ( self , Parts :list =[_sage_const_1 ,_sage_const_2 ] ) -> "Lefschetz_Collection" :192n = self.Parent_Group().Cartan_Degree()193k = self.k()194fw = self.Basis('fw')195196assert isinstance( Parts , list ) , 'The input for ``Parts`` need to be a list.'197198Universe = []199# Initialise part 2 (if desired)200if _sage_const_2 in Parts :201if k == _sage_const_3 :202for Partition in IntegerListsLex( length=_sage_const_3 , floor=[ n-_sage_const_2 , _sage_const_0 , _sage_const_0 ] , ceiling=[ floor(_sage_const_3 /_sage_const_2 *(n-_sage_const_3 )) , ceil(_sage_const_1 /_sage_const_2 *(n-_sage_const_3 )) , _sage_const_0 ] , #max_sum=sum([ (k-i)*(n-k) for i in [ 1 .. k-1 ] ]) ,203min_slope=-n+_sage_const_3 , max_slope=_sage_const_0 ) :204Partition = list(Partition)205Universe += [ [ Partition[Counter-_sage_const_1 ]-Partition[Counter] for Counter in range( _sage_const_1 , len(Partition) ) ] ]206207# Initialise part 1 (if desired)208if _sage_const_1 in Parts :209for Partition in IntegerListsLex( length=k , ceiling=(k-_sage_const_1 )*[n-k]+[_sage_const_0 ] , max_slope=_sage_const_0 ) :210Partition = list(Partition)211Universe += [ [ Partition[Counter-_sage_const_1 ]-Partition[Counter] for Counter in range( _sage_const_1 , len(Partition) ) ] ]212213Universe.reverse()214Starting_Block = [ self.calU( sum([ self.Null_Weight() ] + [ Coefficient*fw[Node] for Node , Coefficient in enumerate( Coefficients , start=_sage_const_1 ) ]) )215for Coefficients in Universe216]217Support_Partition = self.Fano_Index() * [ len(Starting_Block) ]218return self.Lefschetz_Collection( Starting_Block=Starting_Block , Support_Pattern=Support_Partition )219220221222class Quadric_Space ( Orthogonal_Grassmannian ) :223224def __init__( self , Dimension :int ) -> None :225"""226Initialize the quadratic space of a given dimension.227228INPUT:229- ``Dimension`` -- Integer ;230231OUTPUT: None.232"""233assert isinstance( Dimension , Integer ) , TypeError('The input for `Dimension` must be an integer.')234assert _sage_const_0 < Dimension , ValueError('The dimension must be greater than zero.')235236super( Quadric_Space , self ).__init__( k=_sage_const_1 , N=Dimension+_sage_const_2 )237238239def __repr__ ( self ) -> int :240"""Returns all attributes which are necessary to initialize the object."""241return self.Dimension()242243244def __str__ ( self , Output_Style='Long' ) -> str :245"""Returns a one-line string as short description."""246if Output_Style == 'Short' : return 'Q^'+str(self.Dimension())247elif Output_Style == 'Long' : return 'Quadric space of dimension '+str(self.Dimension())+'.'248else : raise ValueError('The input for ``Output_Style`` is inappropriate.')249250251252