schubmult 1.4.2__tar.gz → 1.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {schubmult-1.4.2 → schubmult-1.4.3}/PKG-INFO +1 -1
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/perm_lib.py +62 -26
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_q/schubmult_q.py +69 -5
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_q_double/schubmult_q_double.py +58 -5
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_q_yz/schubmult_q_yz.py +91 -6
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult.egg-info/PKG-INFO +1 -1
- {schubmult-1.4.2 → schubmult-1.4.3}/setup.py +1 -1
- {schubmult-1.4.2 → schubmult-1.4.3}/LICENSE +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/README.md +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/__init__.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_double/__init__.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_double/__main__.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_double/schubmult_double.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_py/__init__.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_py/__main__.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_py/schubmult_py.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_q/__init__.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_q/__main__.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_q_double/__init__.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_q_double/__main__.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_q_yz/__init__.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_q_yz/__main__.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_yz/__init__.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_yz/__main__.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult/schubmult_yz/schubmult_yz.py +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult.egg-info/SOURCES.txt +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult.egg-info/dependency_links.txt +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult.egg-info/entry_points.txt +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult.egg-info/requires.txt +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/schubmult.egg-info/top_level.txt +0 -0
- {schubmult-1.4.2 → schubmult-1.4.3}/setup.cfg +0 -0
@@ -282,49 +282,85 @@ def sg(i,w):
|
|
282
282
|
|
283
283
|
def reduce_q_coeff(u, v, w, qv):
|
284
284
|
for i in range(len(qv)):
|
285
|
-
if (i
|
286
|
-
ret_u = [*u]
|
287
|
-
ret_u[i], ret_u[i+1] = ret_u[i+1], ret_u[i]
|
288
|
-
ret_w = [*w] + [j+1 for j in range(len(w),i+2)]
|
289
|
-
ret_w[i], ret_w[i+1] = ret_w[i+1], ret_w[i]
|
290
|
-
qv_ret = [*qv]
|
291
|
-
qv_ret[i] -= 1
|
292
|
-
return tuple(permtrim(ret_u)), v, tuple(permtrim(ret_w)), qv_ret, True
|
293
|
-
elif (i<len(v)-1 and v[i]>v[i+1] and (i>=len(u)-1 or u[i]<u[i+1]) and (i>=len(w)-1 or w[i]<w[i+1]) and sg(i,w) + omega(i+1,qv) == 1):
|
285
|
+
if sg(i,v) == 1 and sg(i,u) == 0 and sg(i,w) + omega(i+1,qv) == 1:
|
294
286
|
ret_v = [*v]
|
295
287
|
ret_v[i], ret_v[i+1] = ret_v[i+1], ret_v[i]
|
296
288
|
ret_w = [*w] + [j+1 for j in range(len(w),i+2)]
|
297
289
|
ret_w[i], ret_w[i+1] = ret_w[i+1], ret_w[i]
|
298
290
|
qv_ret = [*qv]
|
299
|
-
|
291
|
+
if sg(i,w) == 0:
|
292
|
+
qv_ret[i] -= 1
|
300
293
|
return u, tuple(permtrim(ret_v)), tuple(permtrim(ret_w)), qv_ret, True
|
301
|
-
elif (i
|
294
|
+
elif sg(i,u) == 1 and sg(i,v) == 0 and sg(i,w) + omega(i+1,qv) == 1:
|
302
295
|
ret_u = [*u]
|
303
296
|
ret_u[i], ret_u[i+1] = ret_u[i+1], ret_u[i]
|
304
297
|
ret_w = [*w] + [j+1 for j in range(len(w),i+2)]
|
305
298
|
ret_w[i], ret_w[i+1] = ret_w[i+1], ret_w[i]
|
306
299
|
qv_ret = [*qv]
|
307
|
-
if i
|
308
|
-
qv_ret[i] -= 1
|
309
|
-
|
310
|
-
elif i<len(u)-1 and u[i]>u[i+1] and (i>=len(v)-1 or v[i]<v[i+1]) and sg(i,w)==1 and omega(i+1,qv) == 0:
|
300
|
+
if sg(i,w) == 0:
|
301
|
+
qv_ret[i] -= 1
|
302
|
+
elif sg(i,u) == 1 and sg(i,v) == 1 and sg(i,w)+omega(i+1,qv) == 2:
|
311
303
|
ret_u = [*u]
|
312
304
|
ret_u[i], ret_u[i+1] = ret_u[i+1], ret_u[i]
|
313
305
|
ret_w = [*w] + [j+1 for j in range(len(w),i+2)]
|
314
306
|
ret_w[i], ret_w[i+1] = ret_w[i+1], ret_w[i]
|
315
307
|
qv_ret = [*qv]
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
ret_v = [*v]
|
320
|
-
ret_v[i], ret_v[i+1] = ret_v[i+1], ret_v[i]
|
321
|
-
ret_w = [*w] + [j+1 for j in range(len(w),i+2)]
|
322
|
-
ret_w[i], ret_w[i+1] = ret_w[i+1], ret_w[i]
|
323
|
-
qv_ret = qv
|
324
|
-
#print("Blop v")
|
325
|
-
return u, tuple(permtrim(ret_v)), tuple(permtrim(ret_w)), qv_ret, True
|
308
|
+
if sg(i,w) == 0:
|
309
|
+
qv_ret[i] -= 1
|
310
|
+
return tuple(permtrim(ret_u)), v, tuple(permtrim(ret_w)), qv_ret, True
|
326
311
|
return u, v, w, qv, False
|
327
|
-
|
312
|
+
|
313
|
+
def longest_element(indices):
|
314
|
+
perm = [1,2]
|
315
|
+
did_one = True
|
316
|
+
while did_one:
|
317
|
+
did_one = False
|
318
|
+
for i in range(len(indices)):
|
319
|
+
j = indices[i]-1
|
320
|
+
if sg(j,perm) == 0:
|
321
|
+
if len(perm)<j+2:
|
322
|
+
perm = perm+[index for index in range(len(perm)+1,j+3)]
|
323
|
+
perm[j], perm[j+1] = perm[j+1],perm[j]
|
324
|
+
did_one = True
|
325
|
+
return permtrim(perm)
|
326
|
+
|
327
|
+
def count_less_than(arr,val):
|
328
|
+
ct = 0
|
329
|
+
i = 0
|
330
|
+
while i<len(arr) and arr[i]<val:
|
331
|
+
i += 1
|
332
|
+
ct += 1
|
333
|
+
return ct
|
334
|
+
|
335
|
+
|
336
|
+
def is_parabolic(w,parabolic_index):
|
337
|
+
for i in parabolic_index:
|
338
|
+
if sg(i-1,w) == 1:
|
339
|
+
return False
|
340
|
+
return True
|
341
|
+
|
342
|
+
def check_blocks(qv,parabolic_index):
|
343
|
+
blocks = []
|
344
|
+
cur_block = []
|
345
|
+
last_val = -1
|
346
|
+
for i in range(len(parabolic_index)):
|
347
|
+
if last_val == -1 or last_val + 1 == parabolic_index[i]:
|
348
|
+
last_val = parabolic_index[i]
|
349
|
+
cur_block += [last_val]
|
350
|
+
else:
|
351
|
+
blocks += [cur_block]
|
352
|
+
cur_block = []
|
353
|
+
for block in blocks:
|
354
|
+
for i in range(len(block)):
|
355
|
+
for j in range(i,len(block)):
|
356
|
+
val = 0
|
357
|
+
for k in range(i,j+1):
|
358
|
+
val += omega(block[k],qv)
|
359
|
+
if val != 0 and val != -1:
|
360
|
+
return False
|
361
|
+
return True
|
362
|
+
|
363
|
+
|
328
364
|
# perms and inversion diff
|
329
365
|
def kdown_perms(perm,monoperm,p,k):
|
330
366
|
inv_m = inv(monoperm)
|
@@ -2,6 +2,7 @@ from symengine import *
|
|
2
2
|
from functools import cache
|
3
3
|
from itertools import chain
|
4
4
|
from schubmult.perm_lib import *
|
5
|
+
from schubmult.schubmult_q_yz import factor_out_q_keep_factored
|
5
6
|
import schubmult.schubmult_yz as yz
|
6
7
|
import sys
|
7
8
|
|
@@ -16,6 +17,7 @@ subs_dict = {}
|
|
16
17
|
|
17
18
|
var_x = symarray("x",100).tolist()
|
18
19
|
|
20
|
+
|
19
21
|
def single_variable(coeff_dict,varnum):
|
20
22
|
ret = {}
|
21
23
|
for u in coeff_dict:
|
@@ -264,6 +266,9 @@ def main():
|
|
264
266
|
mult = False
|
265
267
|
mulstring = ""
|
266
268
|
slow = False
|
269
|
+
parabolic = False
|
270
|
+
just_parabolic = False
|
271
|
+
parabolic_index = []
|
267
272
|
|
268
273
|
try:
|
269
274
|
for s in sys.argv[1:]:
|
@@ -273,6 +278,15 @@ def main():
|
|
273
278
|
if s == "--slow":
|
274
279
|
slow = True
|
275
280
|
continue
|
281
|
+
if s == "-parabolic":
|
282
|
+
just_parabolic = True
|
283
|
+
parabolic = True
|
284
|
+
continue
|
285
|
+
if just_parabolic:
|
286
|
+
just_parabolic = False
|
287
|
+
parabolic_index = [int(i) for i in s.split(",")]
|
288
|
+
parabolic_index.sort()
|
289
|
+
continue
|
276
290
|
if mult:
|
277
291
|
mulstring += s
|
278
292
|
continue
|
@@ -300,12 +314,16 @@ def main():
|
|
300
314
|
except Exception:
|
301
315
|
print("**** schubmult_q ****")
|
302
316
|
print("Purpose: Compute the structure constants of quantum Schubert polynomials")
|
303
|
-
print("Usage: schubmult_q <-np|--no-print> <-code> <-grass n> <-equiv> perm1 - perm2 < - perm 3 ... >")
|
304
|
-
print("For the -grass option, must use Grassmannian permutations. -equiv only works together with -grass.")
|
317
|
+
print("Usage: schubmult_q <-np|--no-print> <-parabolic descent1,descent2,...> <-code> <-grass n> <-equiv> perm1 - perm2 < - perm 3 ... >")
|
318
|
+
#print("For the -grass option, must use Grassmannian permutations. -equiv only works together with -grass.")
|
305
319
|
exit(1)
|
306
320
|
|
307
321
|
perms += [curperm]
|
308
322
|
|
323
|
+
if parabolic and len(perms) != 2:
|
324
|
+
print("Only two permutations supported for parabolic.")
|
325
|
+
exit(1)
|
326
|
+
|
309
327
|
|
310
328
|
if grass:
|
311
329
|
perms_t = []
|
@@ -432,6 +450,13 @@ def main():
|
|
432
450
|
for i in range(len(perms)):
|
433
451
|
perms[i] = uncode(perms[i])
|
434
452
|
|
453
|
+
if parabolic:
|
454
|
+
for i in range(len(parabolic_index)):
|
455
|
+
index = parabolic_index[i] - 1
|
456
|
+
if sg(index,perms[0]) == 1 or sg(index,perms[1]) == 1:
|
457
|
+
print("Parabolic given but elements are not minimal length coset representatives.")
|
458
|
+
exit(1)
|
459
|
+
|
435
460
|
coeff_dict = {tuple(permtrim([*perms[0]])): 1}
|
436
461
|
|
437
462
|
if not slow:
|
@@ -445,12 +470,51 @@ def main():
|
|
445
470
|
mul_exp = sympify(mulstring)
|
446
471
|
coeff_dict = mult_poly(coeff_dict,mul_exp)
|
447
472
|
|
448
|
-
if pr:
|
473
|
+
if pr:
|
449
474
|
if ascode:
|
450
475
|
width = max([len(str(trimcode(perm))) for perm in coeff_dict.keys() if expand(coeff_dict[perm])!=0])
|
451
476
|
else:
|
452
477
|
width = max([len(str(perm)) for perm in coeff_dict.keys() if expand(coeff_dict[perm])!=0])
|
453
478
|
|
479
|
+
if parabolic:
|
480
|
+
w_P = longest_element(parabolic_index)
|
481
|
+
w_P_prime = [1,2]
|
482
|
+
coeff_dict_update = {}
|
483
|
+
for w_1 in coeff_dict:
|
484
|
+
val = coeff_dict[w_1]
|
485
|
+
q_dict = factor_out_q_keep_factored(val)
|
486
|
+
for q_part in q_dict:
|
487
|
+
qv = q_vector(q_part)
|
488
|
+
w = [*w_1]
|
489
|
+
good = True
|
490
|
+
parabolic_index2 = []
|
491
|
+
for i in range(len(parabolic_index)):
|
492
|
+
if omega(parabolic_index[i],qv) == 0:
|
493
|
+
parabolic_index2 += [parabolic_index[i]]
|
494
|
+
elif omega(parabolic_index[i],qv) != -1:
|
495
|
+
good = False
|
496
|
+
break
|
497
|
+
if not good:
|
498
|
+
continue
|
499
|
+
w_P_prime = longest_element(parabolic_index2)
|
500
|
+
if not check_blocks(qv,parabolic_index):
|
501
|
+
continue
|
502
|
+
w = permtrim(mulperm(mulperm(w,w_P_prime),w_P))
|
503
|
+
if not is_parabolic(w,parabolic_index):
|
504
|
+
continue
|
505
|
+
|
506
|
+
w = tuple(permtrim(w))
|
507
|
+
|
508
|
+
new_q_part = np.prod([q_var[index+1-count_less_than(parabolic_index,index+1)]**qv[index] for index in range(len(qv)) if index+1 not in parabolic_index])
|
509
|
+
|
510
|
+
try:
|
511
|
+
new_q_part = int(new_q_part)
|
512
|
+
except Exception:
|
513
|
+
pass
|
514
|
+
q_val_part = q_dict[q_part]
|
515
|
+
coeff_dict_update[w] = coeff_dict_update.get(w,0) + new_q_part*q_val_part
|
516
|
+
coeff_dict = coeff_dict_update
|
517
|
+
|
454
518
|
coeff_perms = list(coeff_dict.keys())
|
455
519
|
coeff_perms.sort(key=lambda x: (inv(x),*x))
|
456
520
|
|
@@ -458,9 +522,9 @@ def main():
|
|
458
522
|
val = sympify(coeff_dict[perm]).expand()
|
459
523
|
if val != 0:
|
460
524
|
if ascode:
|
461
|
-
print(f"{str(trimcode(perm))
|
525
|
+
print(f"{str(trimcode(perm))} {str(val).replace('**','^').replace('*',' ')}")
|
462
526
|
else:
|
463
|
-
print(f"{str(perm)
|
527
|
+
print(f"{str(perm)} {str(val).replace('**','^').replace('*',' ')}")
|
464
528
|
except BrokenPipeError:
|
465
529
|
pass
|
466
530
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from schubmult.perm_lib import *
|
2
|
-
from schubmult.schubmult_q_yz import schubmult, schubmult_db, mult_poly
|
2
|
+
from schubmult.schubmult_q_yz import schubmult, schubmult_db, mult_poly, factor_out_q_keep_factored
|
3
3
|
from symengine import *
|
4
4
|
import sys
|
5
5
|
|
@@ -39,6 +39,10 @@ def main():
|
|
39
39
|
mult = False
|
40
40
|
slow = False
|
41
41
|
mulstring = ""
|
42
|
+
parabolic = False
|
43
|
+
just_parabolic = False
|
44
|
+
parabolic_index = []
|
45
|
+
|
42
46
|
try:
|
43
47
|
for s in sys.argv[1:]:
|
44
48
|
if s == "-np" or s == "--no-print":
|
@@ -47,6 +51,15 @@ def main():
|
|
47
51
|
if s == "--slow":
|
48
52
|
slow = True
|
49
53
|
continue
|
54
|
+
if s == "-parabolic":
|
55
|
+
just_parabolic = True
|
56
|
+
parabolic = True
|
57
|
+
continue
|
58
|
+
if just_parabolic:
|
59
|
+
just_parabolic = False
|
60
|
+
parabolic_index = [int(i) for i in s.split(",")]
|
61
|
+
parabolic_index.sort()
|
62
|
+
continue
|
50
63
|
if mult:
|
51
64
|
mulstring += s
|
52
65
|
continue
|
@@ -71,7 +84,7 @@ def main():
|
|
71
84
|
if s == "--usage":
|
72
85
|
print("**** schubmult_q_double ****")
|
73
86
|
print("Purpose: Compute equivariant Gromov-Witten invariants, structure constants of quantum double Schubert polynomials")
|
74
|
-
print("Usage: schubmult_q_double <-np|--no-print> <-code> <--display-positive> <--optimizer-message> perm1 - perm2 < - perm3 .. >")
|
87
|
+
print("Usage: schubmult_q_double <-np|--no-print> <-parabolic descent1,descent2,...> <-code> <--display-positive> <--optimizer-message> perm1 - perm2 < - perm3 .. >")
|
75
88
|
#print("Alternative usage: schubmult_yz <-code> <--display-positive> -coprod perm - indexlist")
|
76
89
|
exit(0)
|
77
90
|
if s == "-":
|
@@ -82,7 +95,7 @@ def main():
|
|
82
95
|
except Exception:
|
83
96
|
print("**** schubmult_q_double ****")
|
84
97
|
print("Purpose: Compute equivariant Gromov-Witten invariants, structure constants of quantum double Schubert polynomials")
|
85
|
-
print("Usage: schubmult_q_double <-np|--no-print> <-code> <--display-positive> <--optimizer-message> perm1 - perm2 < - perm3 .. >")
|
98
|
+
print("Usage: schubmult_q_double <-np|--no-print> <-code> <-parabolic descent1,descent2,...> <--display-positive> <--optimizer-message> perm1 - perm2 < - perm3 .. >")
|
86
99
|
exit(1)
|
87
100
|
|
88
101
|
perms += [curperm]
|
@@ -109,6 +122,46 @@ def main():
|
|
109
122
|
coeff_dict = mult_poly(coeff_dict,mul_exp)
|
110
123
|
|
111
124
|
if pr:
|
125
|
+
|
126
|
+
if parabolic:
|
127
|
+
w_P = longest_element(parabolic_index)
|
128
|
+
w_P_prime = [1,2]
|
129
|
+
coeff_dict_update = {}
|
130
|
+
for w_1 in coeff_dict:
|
131
|
+
val = coeff_dict[w_1]
|
132
|
+
q_dict = factor_out_q_keep_factored(val)
|
133
|
+
for q_part in q_dict:
|
134
|
+
qv = q_vector(q_part)
|
135
|
+
w = [*w_1]
|
136
|
+
good = True
|
137
|
+
parabolic_index2 = []
|
138
|
+
for i in range(len(parabolic_index)):
|
139
|
+
if omega(parabolic_index[i],qv) == 0:
|
140
|
+
parabolic_index2 += [parabolic_index[i]]
|
141
|
+
elif omega(parabolic_index[i],qv) != -1:
|
142
|
+
good = False
|
143
|
+
break
|
144
|
+
if not good:
|
145
|
+
continue
|
146
|
+
w_P_prime = longest_element(parabolic_index2)
|
147
|
+
if not check_blocks(qv,parabolic_index):
|
148
|
+
continue
|
149
|
+
w = permtrim(mulperm(mulperm(w,w_P_prime),w_P))
|
150
|
+
if not is_parabolic(w,parabolic_index):
|
151
|
+
continue
|
152
|
+
|
153
|
+
w = tuple(permtrim(w))
|
154
|
+
|
155
|
+
new_q_part = np.prod([q_var[index+1-count_less_than(parabolic_index,index+1)]**qv[index] for index in range(len(qv)) if index+1 not in parabolic_index])
|
156
|
+
|
157
|
+
try:
|
158
|
+
new_q_part = int(new_q_part)
|
159
|
+
except Exception:
|
160
|
+
pass
|
161
|
+
q_val_part = q_dict[q_part]
|
162
|
+
coeff_dict_update[w] = coeff_dict_update.get(w,0) + new_q_part*q_val_part
|
163
|
+
coeff_dict = coeff_dict_update
|
164
|
+
|
112
165
|
if ascode:
|
113
166
|
width = max([len(str(trimcode(perm))) for perm in coeff_dict.keys() if expand(sympify(coeff_dict[perm]).subs(subs_dict))!=0])
|
114
167
|
else:
|
@@ -127,9 +180,9 @@ def main():
|
|
127
180
|
notint = True
|
128
181
|
if val!=0:
|
129
182
|
if ascode:
|
130
|
-
print(f"{str(trimcode(perm))
|
183
|
+
print(f"{str(trimcode(perm))} {str(val).replace('**','^').replace('*',' ')}")
|
131
184
|
else:
|
132
|
-
print(f"{str(perm)
|
185
|
+
print(f"{str(perm)} {str(val).replace('**','^').replace('*',' ')}")
|
133
186
|
except BrokenPipeError:
|
134
187
|
pass
|
135
188
|
|
@@ -347,7 +347,7 @@ var3_t = tuple(var3.tolist())
|
|
347
347
|
def print_usage():
|
348
348
|
print("**** schubmult_q_yz ****")
|
349
349
|
print("Purpose: Compute Molev-Sagan coefficients of quantum double Schubert polynomials")
|
350
|
-
print("Usage: schubmult_q_yz <-np|--no-print> <-code> <--display-positive> <--optimizer-message> perm1 - perm2 < - perm3 .. > <-mult poly_expression>")
|
350
|
+
print("Usage: schubmult_q_yz <-np|--no-print> <-parabolic descent1,descent2,...> <-code> <--display-positive> <--optimizer-message> perm1 - perm2 < - perm3 .. > <-mult poly_expression>")
|
351
351
|
print(" *** Computes products")
|
352
352
|
print("Alternative usage: schubmult_q_yz -nil-hecke n <-code> <--display-positive> perm")
|
353
353
|
print(" *** Computes nil-Hecke representation of quantum double Schubert polynomial, limiting to the group S_n")
|
@@ -371,6 +371,9 @@ def main():
|
|
371
371
|
just_nil = False
|
372
372
|
mult = False
|
373
373
|
slow = False
|
374
|
+
parabolic = False
|
375
|
+
just_parabolic = False
|
376
|
+
parabolic_index = []
|
374
377
|
|
375
378
|
nil_N = 0
|
376
379
|
|
@@ -390,6 +393,14 @@ def main():
|
|
390
393
|
if s == "--norep":
|
391
394
|
norep = True
|
392
395
|
continue
|
396
|
+
if s == "-parabolic":
|
397
|
+
just_parabolic = True
|
398
|
+
parabolic = True
|
399
|
+
continue
|
400
|
+
if just_parabolic:
|
401
|
+
just_parabolic = False
|
402
|
+
parabolic_index = [int(i) for i in s.split(",")]
|
403
|
+
continue
|
393
404
|
if s == "--expand":
|
394
405
|
expa = True
|
395
406
|
continue
|
@@ -452,6 +463,17 @@ def main():
|
|
452
463
|
size = 0
|
453
464
|
L = len(perms)
|
454
465
|
|
466
|
+
if parabolic and len(perms) != 2:
|
467
|
+
print("Only two permutations supported for parabolic.")
|
468
|
+
exit(1)
|
469
|
+
|
470
|
+
if parabolic:
|
471
|
+
for i in range(len(parabolic_index)):
|
472
|
+
index = parabolic_index[i] - 1
|
473
|
+
if sg(index,perms[0]) == 1 or sg(index,perms[1]) == 1:
|
474
|
+
print("Parabolic given but elements are not minimal length coset representatives.")
|
475
|
+
exit(1)
|
476
|
+
|
455
477
|
if nilhecke:
|
456
478
|
coeff_dict = nil_hecke({(1,2): 1},perms[0],nil_N)
|
457
479
|
rep = ("y","x")
|
@@ -483,10 +505,72 @@ def main():
|
|
483
505
|
rep = ("","")
|
484
506
|
|
485
507
|
if pr:
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
508
|
+
posified = False
|
509
|
+
if parabolic:
|
510
|
+
if display_positive:
|
511
|
+
posified = True
|
512
|
+
w_P = longest_element(parabolic_index)
|
513
|
+
w_P_prime = [1,2]
|
514
|
+
coeff_dict_update = {}
|
515
|
+
for w_1 in coeff_dict:
|
516
|
+
val = coeff_dict[w_1]
|
517
|
+
q_dict = factor_out_q_keep_factored(val)
|
518
|
+
for q_part in q_dict:
|
519
|
+
qv = q_vector(q_part)
|
520
|
+
w = [*w_1]
|
521
|
+
good = True
|
522
|
+
parabolic_index2 = []
|
523
|
+
for i in range(len(parabolic_index)):
|
524
|
+
if omega(parabolic_index[i],qv) == 0:
|
525
|
+
parabolic_index2 += [parabolic_index[i]]
|
526
|
+
elif omega(parabolic_index[i],qv) != -1:
|
527
|
+
good = False
|
528
|
+
break
|
529
|
+
if not good:
|
530
|
+
continue
|
531
|
+
w_P_prime = longest_element(parabolic_index2)
|
532
|
+
if not check_blocks(qv,parabolic_index):
|
533
|
+
continue
|
534
|
+
w = permtrim(mulperm(mulperm(w,w_P_prime),w_P))
|
535
|
+
if not is_parabolic(w,parabolic_index):
|
536
|
+
continue
|
537
|
+
|
538
|
+
w = tuple(permtrim(w))
|
539
|
+
|
540
|
+
new_q_part = np.prod([q_var[index+1-count_less_than(parabolic_index,index+1)]**qv[index] for index in range(len(qv)) if index+1 not in parabolic_index])
|
541
|
+
|
542
|
+
try:
|
543
|
+
new_q_part = int(new_q_part)
|
544
|
+
except Exception:
|
545
|
+
pass
|
546
|
+
q_val_part = q_dict[q_part]
|
547
|
+
if display_positive:
|
548
|
+
try:
|
549
|
+
q_val_part = int(q_val_part)
|
550
|
+
except Exception:
|
551
|
+
try:
|
552
|
+
if len(perms) == 2 and q_part == 1:
|
553
|
+
u = permtrim([*perms[0]])
|
554
|
+
v = permtrim([*perms[1]])
|
555
|
+
q_val_part = posify(q_dict[q_part],tuple(u),tuple(v),w_1,var2_t,var3_t,msg,False)
|
556
|
+
else:
|
557
|
+
qv = q_vector(q_part)
|
558
|
+
u2, v2, w2 = perms[0], perms[1], w_1
|
559
|
+
u2, v2, w2, qv, did_one = reduce_q_coeff(u2, v2, w2, qv)
|
560
|
+
while did_one:
|
561
|
+
u2, v2, w2, qv, did_one = reduce_q_coeff(u2, v2, w2, qv)
|
562
|
+
#print(f"new {u=} {v=}")
|
563
|
+
q_part2 = np.prod([q_var[i+1]**qv[i] for i in range(len(qv))])
|
564
|
+
if q_part2 == 1:
|
565
|
+
q_val_part = posify(q_dict[q_part],u2,v2,w2,var2_t,var3_t,msg,False)
|
566
|
+
else:
|
567
|
+
q_val_part = compute_positive_rep(q_dict[q_part],var2_t,var3_t,msg,False)
|
568
|
+
except Exception as e:
|
569
|
+
print(f"error; write to schubmult@gmail.com with the case {perms=} {perm=} {q_part*q_val_part=} {coeff_dict.get(w_1,0)=}")
|
570
|
+
print(f"Exception: {e}")
|
571
|
+
exit(1)
|
572
|
+
coeff_dict_update[w] = coeff_dict_update.get(w,0) + new_q_part*q_val_part
|
573
|
+
coeff_dict = coeff_dict_update
|
490
574
|
|
491
575
|
coeff_perms = list(coeff_dict.keys())
|
492
576
|
coeff_perms.sort(key=lambda x: (inv(x),*x))
|
@@ -500,7 +584,7 @@ def main():
|
|
500
584
|
except Exception:
|
501
585
|
notint = True
|
502
586
|
val2 = 0
|
503
|
-
if display_positive:
|
587
|
+
if display_positive and not posified:
|
504
588
|
q_dict = factor_out_q_keep_factored(val)
|
505
589
|
for q_part in q_dict:
|
506
590
|
#print(f"{q_part=} {q_dict[q_part]=}")
|
@@ -527,6 +611,7 @@ def main():
|
|
527
611
|
# print(f"Posified q part {q_part} {q_dict[q_part]=}")
|
528
612
|
val2 += q_part*posify(q_dict[q_part],u2,v2,w2,var2_t,var3_t,msg,False)
|
529
613
|
else:
|
614
|
+
#print("Failed to posify")
|
530
615
|
val2 += q_part*compute_positive_rep(q_dict[q_part],var2_t,var3_t,msg,False)
|
531
616
|
else:
|
532
617
|
val2 += q_part*compute_positive_rep(q_dict[q_part],var2_t,var3_t,msg,False)
|
@@ -6,7 +6,7 @@ long_description = (this_directory / "README.md").read_text()
|
|
6
6
|
|
7
7
|
setup(
|
8
8
|
name="schubmult",
|
9
|
-
version="1.4.
|
9
|
+
version="1.4.3",
|
10
10
|
description="Computing Littlewood-Richardson coefficients of Schubert polynomials",
|
11
11
|
long_description=long_description,
|
12
12
|
long_description_content_type='text/markdown',
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|