Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Environment to perform calculations of equivariant vector bundles on homogeneous varieties

1842 views
License: GPL3
ubuntu2204
1
2
3
# This file was *autogenerated* from the file Orthogonal_Grassmannian.sage
4
from sage.all_cmdline import * # import sage library
5
6
_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)
7
from typing import Iterator
8
from Equivariant_Vector_Bundles_On_Homogeneous_Varieties.Base_Space.Homogeneous_Variety import Irreducible_Homogeneous_Variety
9
10
11
12
class Orthogonal_Grassmannian ( Irreducible_Homogeneous_Variety ) :
13
14
def __init__( self , k :int , N :int ) -> None :
15
"""
16
Initialize the Grassmannian OGr(k,N).
17
18
INPUT:
19
- ``k`` -- Integer ;
20
- ``N`` -- Integer ;
21
22
OUTPUT: None.
23
"""
24
assert isinstance( N , Integer ) , TypeError('The input for `N` must be an integer.')
25
assert _sage_const_5 <= N , ValueError('The integer `N` must be equal to or greater than 5.')
26
27
assert isinstance( k , Integer ) , TypeError('The input for `k` must be an integer.')
28
assert 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 ) )))+'.')
29
30
from Equivariant_Vector_Bundles_On_Homogeneous_Varieties.Base_Space.Homogeneous_Variety import Irreducible_Cartan_Group
31
if N % _sage_const_2 == _sage_const_0 :
32
G = Irreducible_Cartan_Group( Cartan_Family='D' , Cartan_Degree=N/_sage_const_2 )
33
if k in (ellipsis_range( _sage_const_1 ,Ellipsis, N/_sage_const_2 -_sage_const_2 )) : P = G.Maximal_Parabolic_Subgroup( Excluded_Node=k )
34
elif 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 } )
35
elif k == N/_sage_const_2 : P = G.Maximal_Parabolic_Subgroup( Excluded_Node=N/_sage_const_2 -_sage_const_1 )
36
else :
37
G = Irreducible_Cartan_Group( Cartan_Family='B' , Cartan_Degree=floor(N/_sage_const_2 ) )
38
P = G.Maximal_Parabolic_Subgroup( Excluded_Node=k )
39
40
super( Orthogonal_Grassmannian , self ).__init__( P )
41
42
43
def __repr__ ( self ) -> tuple[ int ] :
44
"""Returns all attributes which are necessary to initialize the object."""
45
return self.k() , self.N()
46
47
48
def __str__ ( self , Output_Style='Long' ) -> str :
49
"""Returns a one-line string as short description."""
50
if Output_Style == 'Short' : return 'OGr('+str(self.k())+';'+str(self.N())+')'
51
elif Output_Style == 'Long' : return 'Orthogonal grassmannian variety of '+str(self.k())+'-dimensional isotropic linear subspaces' + ' in a '+str(self.N())+'-dimensional ambient vector space.'
52
else : raise ValueError('The input for ``Output_Style`` is inappropriate.')
53
54
55
# Synonym for the method ``Spinor_Bundle``
56
def calS ( self ) -> "Irreducible_Equivariant_Vector_Bundle" :
57
"""Returns the spinor bundle ."""
58
return self.Spinor_Bundle()
59
60
61
def Fano_Index ( self ) -> int :
62
"""Returns the Fano index of ``self``."""
63
for Node , Fano_Index in super( Orthogonal_Grassmannian , self ).Fano_Index() :
64
if Node == self.k() : return Fano_Index
65
raise ValueError('PROBLEM! We could not compute the Fano index.')
66
67
68
def My_Collection ( self , Modus :str ='Consecutive' , Parts :list =[_sage_const_1 ,_sage_const_2 ] ) -> "Lefschetz_Collection" :
69
assert isinstance( Modus , str ) , 'The input for `Modus` need to be a string.'
70
71
if Modus in [ 'Consecutive' , 'Con' ] :
72
ConLC = self.Lefschetz_Collection( Starting_Block=[] )
73
ConLC += self.Tautological_Collection( Parts=Parts )
74
ConLC += self.Spinor_Collection()
75
return ConLC
76
77
elif Modus in [ 'Alternating' , 'Alt' ] :
78
ConLC = self.My_Collection( Modus='Consecutive' , Parts=Parts )
79
Stock = dict({})
80
for ColumnCounter in range(ConLC.Width()) :
81
Orbit = ConLC.Subcollection( Columns=[ColumnCounter] )
82
d = max([ Summand.Highest_Weight().to_ambient()[_sage_const_0 ] for Summand in Orbit[_sage_const_0 ].Irreducible_Components() ])
83
if not d in Stock.keys() : Stock.update({ d : self.Lefschetz_Collection( Starting_Block=[] ) })
84
Stock[d] += Orbit
85
AltLC = self.Lefschetz_Collection( Starting_Block=[] )
86
for d , Part in sorted(Stock.items()) :
87
AltLC += Part
88
return AltLC
89
90
else :
91
raise ValueError( 'The input for `Modus` is unknown.' )
92
93
94
def Spinor_Bundle ( self , Parity : int or str or None =None ) -> "Irreducible_Equivariant_Vector_Bundle" :
95
"""Returns the spinor bundle."""
96
Cartan_Family = self.Cartan_Family()
97
n = self.Cartan_Degree()
98
fw = self.Basis('fw')
99
if Cartan_Family == 'B' :
100
return self.calU( fw[n] )
101
102
elif Cartan_Family == 'D' :
103
if Parity in [ _sage_const_1 , '+' ] : return self.calU( fw[n-_sage_const_1 ] )
104
elif Parity in [ -_sage_const_1 , '-' ] : return self.calU( fw[n] )
105
else : raise ValueError('For the Cartan Family D, there need to be a parity `+` or `-`.')
106
107
else :
108
raise ValueError('Conflict! There are only spinor bundles for Cartan families B_n and D_n respectively.')
109
110
111
def Spinor_Collection ( self ) -> "Lefschetz_Collection" :
112
Cartan_Family = self.Parent_Group().Cartan_Family()
113
n = self.Parent_Group().Cartan_Degree()
114
k = self.k()
115
fw = self.Basis('fw')
116
LC = self.Lefschetz_Collection( Starting_Block=[] , Support_Pattern='Trivial' )
117
if Cartan_Family == 'B' :
118
Starting_Block = []
119
if k == _sage_const_1 :
120
Starting_Block = [ self.calU( fw[n] ) ]
121
Support_Partition = tuple( [ _sage_const_1 ] )
122
LC += self.Lefschetz_Collection( Starting_Block=Starting_Block , Support_Pattern=Support_Partition )
123
124
elif k == _sage_const_2 :
125
if n == _sage_const_2 :
126
pass
127
128
else :
129
Starting_Block = [ self.calU( fw[n] ) ]
130
Support_Partition = tuple( (_sage_const_2 *n-_sage_const_2 )*[ _sage_const_1 ] )
131
LC += self.Lefschetz_Collection( Starting_Block=Starting_Block , Support_Pattern=Support_Partition )
132
133
elif _sage_const_3 <= k :
134
if k < n : Starting_Block += [ self.calU(fw[n]) ]
135
Starting_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] ) )
136
for Degree in range(_sage_const_1 ,n-k+_sage_const_1 )
137
]
138
Support_Partition = tuple( self.Fano_Index()*[ len(Starting_Block) ] )
139
LC += self.Lefschetz_Collection( Starting_Block=Starting_Block , Support_Pattern=Support_Partition )
140
141
if k == _sage_const_3 :
142
if n == _sage_const_3 :
143
Starting_Block = [ self.calU( fw[_sage_const_1 ] ).Extend_Equivariantly_By( self.calO() ) ]
144
Support_Partition = tuple( _sage_const_2 *[ _sage_const_1 ] )
145
else :
146
Starting_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] ) ) ]
147
Support_Partition = tuple( (n-_sage_const_2 )*[ _sage_const_1 ] )
148
LC += self.Lefschetz_Collection( Starting_Block=Starting_Block , Support_Pattern=Support_Partition )
149
150
elif Cartan_Family == 'D' :
151
pass
152
153
return LC
154
155
156
def Spinor_Filtration ( self , Parity :str or None =None , Factor :"Equivariant_Vector_Bundle" or None =None ) -> Iterator[ str ] :
157
"""
158
Returns the filtration on the spinor bundle.
159
160
REFERENCE:
161
- [Kuz08a] Kuznetsov, Alexander: Exceptional collections for Grassmannians of isotropic lines.
162
"""
163
if Factor == None : Factor = self.calO()
164
assert isinstance( Factor , Equivariant_Vector_Bundle ) , 'The input for `Factor` need to be an equivariant vector bundle.'
165
Cartan_Family = self.Cartan_Family()
166
n = self.Cartan_Degree()
167
k = self.k()
168
fw = self.Basis('fw')
169
if Cartan_Family == 'B' :
170
calS = self.calS()
171
calU = self.calU()
172
yield 'F_'+str(k+_sage_const_1 )+' = 0'
173
for i in range( k , -_sage_const_1 , -_sage_const_1 ) :
174
Quotient = str( calS * calU.Exterior_Power(i) * Factor )
175
yield '0 --> F_'+str(i+_sage_const_1 )+' --> F_'+str(i)+' --> '+str(Quotient)+' --> 0'
176
yield 'F_0 = '+str( Factor.Multiply_By( calS.H0() ) )
177
178
elif Cartan_Family == 'D' :
179
if Parity in [ _sage_const_1 , '+' ] : ParityStr = '+' ; ParityInt = _sage_const_1
180
elif Parity in [ -_sage_const_1 , '-' ] : ParityStr = '-' ; ParityInt = -_sage_const_1
181
else : raise ValueError('For the Cartan Family D, there need to be a parity in '+str([ _sage_const_1 , '+' ])+' or in '+str([ -_sage_const_1 , '-' ])+'.')
182
yield 'F^'+ParityStr+'_'+str(k+_sage_const_1 )+' = 0'
183
for i in range( k , -_sage_const_1 , -_sage_const_1 ) :
184
Quotient = str( self.calS( ParityInt * (-_sage_const_1 )**i ) * calU.Exterior_Power(i) * Factor )
185
yield '0 --> F^'+ParityStr+'_'+str(i+_sage_const_1 )+' --> F^'+ParityStr+'_'+str(i)+' --> '+str(Quotient)+' --> 0'
186
yield 'F_0 = '+str( Factor.Multiply_By( self.calS(Parity).H0() ) )
187
188
else :
189
raise ValueError('Conflict! There are only spinor bundles for Cartan families B_n and D_n respectively.')
190
191
192
def Tautological_Collection ( self , Parts :list =[_sage_const_1 ,_sage_const_2 ] ) -> "Lefschetz_Collection" :
193
n = self.Parent_Group().Cartan_Degree()
194
k = self.k()
195
fw = self.Basis('fw')
196
197
assert isinstance( Parts , list ) , 'The input for ``Parts`` need to be a list.'
198
199
Universe = []
200
# Initialise part 2 (if desired)
201
if _sage_const_2 in Parts :
202
if k == _sage_const_3 :
203
for 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 ] ]) ,
204
min_slope=-n+_sage_const_3 , max_slope=_sage_const_0 ) :
205
Partition = list(Partition)
206
Universe += [ [ Partition[Counter-_sage_const_1 ]-Partition[Counter] for Counter in range( _sage_const_1 , len(Partition) ) ] ]
207
208
# Initialise part 1 (if desired)
209
if _sage_const_1 in Parts :
210
for Partition in IntegerListsLex( length=k , ceiling=(k-_sage_const_1 )*[n-k]+[_sage_const_0 ] , max_slope=_sage_const_0 ) :
211
Partition = list(Partition)
212
Universe += [ [ Partition[Counter-_sage_const_1 ]-Partition[Counter] for Counter in range( _sage_const_1 , len(Partition) ) ] ]
213
214
Universe.reverse()
215
Starting_Block = [ self.calU( sum([ self.Null_Weight() ] + [ Coefficient*fw[Node] for Node , Coefficient in enumerate( Coefficients , start=_sage_const_1 ) ]) )
216
for Coefficients in Universe
217
]
218
Support_Partition = self.Fano_Index() * [ len(Starting_Block) ]
219
return self.Lefschetz_Collection( Starting_Block=Starting_Block , Support_Pattern=Support_Partition )
220
221
222
223
class Quadric_Space ( Orthogonal_Grassmannian ) :
224
225
def __init__( self , Dimension :int ) -> None :
226
"""
227
Initialize the quadratic space of a given dimension.
228
229
INPUT:
230
- ``Dimension`` -- Integer ;
231
232
OUTPUT: None.
233
"""
234
assert isinstance( Dimension , Integer ) , TypeError('The input for `Dimension` must be an integer.')
235
assert _sage_const_0 < Dimension , ValueError('The dimension must be greater than zero.')
236
237
super( Quadric_Space , self ).__init__( k=_sage_const_1 , N=Dimension+_sage_const_2 )
238
239
240
def __repr__ ( self ) -> int :
241
"""Returns all attributes which are necessary to initialize the object."""
242
return self.Dimension()
243
244
245
def __str__ ( self , Output_Style='Long' ) -> str :
246
"""Returns a one-line string as short description."""
247
if Output_Style == 'Short' : return 'Q^'+str(self.Dimension())
248
elif Output_Style == 'Long' : return 'Quadric space of dimension '+str(self.Dimension())+'.'
249
else : raise ValueError('The input for ``Output_Style`` is inappropriate.')
250
251
252