schubmult 1.3.8__tar.gz → 1.3.9__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.
Files changed (31) hide show
  1. {schubmult-1.3.8 → schubmult-1.3.9}/PKG-INFO +1 -1
  2. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/perm_lib.py +7 -0
  3. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_q_yz/schubmult_q_yz.py +35 -5
  4. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_yz/schubmult_yz.py +21 -2
  5. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult.egg-info/PKG-INFO +1 -1
  6. {schubmult-1.3.8 → schubmult-1.3.9}/setup.py +1 -1
  7. {schubmult-1.3.8 → schubmult-1.3.9}/LICENSE +0 -0
  8. {schubmult-1.3.8 → schubmult-1.3.9}/README.md +0 -0
  9. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/__init__.py +0 -0
  10. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_double/__init__.py +0 -0
  11. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_double/__main__.py +0 -0
  12. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_double/schubmult_double.py +0 -0
  13. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_py/__init__.py +0 -0
  14. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_py/__main__.py +0 -0
  15. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_py/schubmult_py.py +0 -0
  16. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_q/__init__.py +0 -0
  17. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_q/__main__.py +0 -0
  18. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_q/schubmult_q.py +0 -0
  19. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_q_double/__init__.py +0 -0
  20. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_q_double/__main__.py +0 -0
  21. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_q_double/schubmult_q_double.py +0 -0
  22. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_q_yz/__init__.py +0 -0
  23. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_q_yz/__main__.py +0 -0
  24. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_yz/__init__.py +0 -0
  25. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult/schubmult_yz/__main__.py +0 -0
  26. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult.egg-info/SOURCES.txt +0 -0
  27. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult.egg-info/dependency_links.txt +0 -0
  28. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult.egg-info/entry_points.txt +0 -0
  29. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult.egg-info/requires.txt +0 -0
  30. {schubmult-1.3.8 → schubmult-1.3.9}/schubmult.egg-info/top_level.txt +0 -0
  31. {schubmult-1.3.8 → schubmult-1.3.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: schubmult
3
- Version: 1.3.8
3
+ Version: 1.3.9
4
4
  Summary: Computing Littlewood-Richardson coefficients of Schubert polynomials
5
5
  Home-page: https://github.com/matthematics/schubmult
6
6
  Author: Matt Samuel
@@ -322,6 +322,13 @@ def add_perm_dict(d1,d2):
322
322
  zero = sympify(0)
323
323
  one = sympify(1)
324
324
 
325
+ def elem_sym_poly_q(p,k,varl1,varl2):
326
+ if p == 0 and k>=0:
327
+ return one
328
+ if p<0 or p>k:
329
+ return zero
330
+ return (varl1[k-1] - varl2[k-p])*elem_sym_poly_q(p-1,k-1,varl1,varl2)+elem_sym_poly_q(p,k-1,varl1,varl2)+q_var[k-1]*elem_sym_poly_q(p-2,k-2,varl1,varl2)
331
+
325
332
  def elem_sym_poly(p,k,varl1,varl2,xstart=0,ystart=0):
326
333
  global zero, one
327
334
  if p>k:
@@ -10,6 +10,13 @@ var_y = var2.tolist()
10
10
  var_z = var3.tolist()
11
11
  var_x = symarray("x",100).tolist()
12
12
 
13
+ x = var_x
14
+ y = var_y
15
+ z = var_z
16
+
17
+ def E(p,k,varl=var_y[1:]):
18
+ return elem_sym_poly_q(p,k,var_x[1:],varl)
19
+
13
20
  def single_variable(coeff_dict,varnum):
14
21
  ret = {}
15
22
  for u in coeff_dict:
@@ -267,6 +274,8 @@ def main():
267
274
  nil_N = 0
268
275
 
269
276
  mulstring = ""
277
+ norep = False
278
+ expa = False
270
279
 
271
280
  try:
272
281
  for s in sys.argv[1:]:
@@ -274,6 +283,12 @@ def main():
274
283
  just_nil = False
275
284
  nil_N = int(s)
276
285
  continue
286
+ if s == "--norep":
287
+ norep = True
288
+ continue
289
+ if s == "--expand":
290
+ expa = True
291
+ continue
277
292
  if s == "-np" or s == "--no-print":
278
293
  pr = False
279
294
  continue
@@ -322,6 +337,8 @@ def main():
322
337
  perms[i] = tuple(permtrim(uncode(perms[i])))
323
338
  else:
324
339
  for i in range(len(perms)):
340
+ if len(perms[i])<2 and (len(perms[i])==0 or perms[i][0]==1):
341
+ perms[i] = (1,2)
325
342
  perms[i] = tuple(permtrim([*perms[i]]))
326
343
 
327
344
  size = 0
@@ -335,10 +352,15 @@ def main():
335
352
  for perm in perms[1:]:
336
353
  coeff_dict = schubmult(coeff_dict,perm)
337
354
  if mult:
338
- mul_exp = sympify(mulstring)
355
+ for v in var2:
356
+ globals()[str(v)] = v
357
+ for v in var3:
358
+ globals()[str(v)] = v
359
+ for v in var_x:
360
+ globals()[str(v)] = v
361
+ mul_exp = eval(mulstring)
339
362
  coeff_dict = mult_poly(coeff_dict,mul_exp)
340
- rep = ("","")
341
- rep = ("","")
363
+ rep = ("","")
342
364
 
343
365
  if pr:
344
366
  if ascode:
@@ -398,11 +420,19 @@ def main():
398
420
  print(f"error: value not equal; write to schubmult@gmail.com with the case {perms=} {perm=} {val=} {coeff_dict.get(perm,0)=}")
399
421
  exit(1)
400
422
  val = val2
423
+ if expa:
424
+ val = expand(val)
401
425
  if val!=0:
402
426
  if ascode:
403
- print(f"{str(trimcode(perm)):>{width}} {str(val).replace('**','^').replace('*',' ').replace(*rep)}")
427
+ if norep:
428
+ print(f"{str(trimcode(perm)):>{width}} {str(val).replace(*rep)}")
429
+ else:
430
+ print(f"{str(trimcode(perm)):>{width}} {str(val).replace('**','^').replace('*',' ').replace(*rep)}")
404
431
  else:
405
- print(f"{str(perm):>{width}} {str(val).replace('**','^').replace('*',' ').replace(*rep)}")
432
+ if norep:
433
+ print(f"{str(perm):>{width}} {str(val).replace(*rep)}")
434
+ else:
435
+ print(f"{str(perm):>{width}} {str(val).replace('**','^').replace('*',' ').replace(*rep)}")
406
436
  except BrokenPipeError:
407
437
  pass
408
438
 
@@ -28,6 +28,15 @@ var2 = tuple(symarray('y',n).tolist())
28
28
  var3 = tuple(symarray('z',n).tolist())
29
29
 
30
30
  var_x = symarray("x",100).tolist()
31
+ var_y = var2
32
+ var_z = var3
33
+
34
+ x = var_x
35
+ y = var_y
36
+ z = var_z
37
+
38
+ def E(p,k,varl=var_y[1:]):
39
+ return elem_sym_poly(p,k,var_x[1:],varl)
31
40
 
32
41
  def single_variable(coeff_dict,varnum):
33
42
  ret = {}
@@ -1600,6 +1609,8 @@ def main():
1600
1609
  perms[i] = tuple(permtrim(uncode(perms[i])))
1601
1610
  else:
1602
1611
  for i in range(len(perms)):
1612
+ if len(perms[i])<2 and (len(perms[i])==0 or perms[i][0]==1):
1613
+ perms[i] = (1,2)
1603
1614
  perms[i] = tuple(permtrim([*perms[i]]))
1604
1615
 
1605
1616
  size = 0
@@ -1612,17 +1623,25 @@ def main():
1612
1623
  coeff_dict = {perms[0]: 1}
1613
1624
  check_coeff_dict = {perms[0]: 1}
1614
1625
 
1626
+ if mult:
1627
+ for v in var2:
1628
+ globals()[str(v)] = v
1629
+ for v in var3:
1630
+ globals()[str(v)] = v
1631
+ for v in var_x:
1632
+ globals()[str(v)] = v
1633
+
1615
1634
  if down:
1616
1635
  for perm in orig_perms[1:]:
1617
1636
  check_coeff_dict = schubmult_down(check_coeff_dict,perm)
1618
1637
  if mult:
1619
- mul_exp = sympify(mulstring)
1638
+ mul_exp = eval(mulstring)
1620
1639
  check_coeff_dict = mult_poly_down(check_coeff_dict,mul_exp)
1621
1640
  else:
1622
1641
  for perm in orig_perms[1:]:
1623
1642
  check_coeff_dict = schubmult(check_coeff_dict,perm)
1624
1643
  if mult:
1625
- mul_exp = sympify(mulstring)
1644
+ mul_exp = eval(mulstring)
1626
1645
  check_coeff_dict = mult_poly(check_coeff_dict,mul_exp)
1627
1646
 
1628
1647
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: schubmult
3
- Version: 1.3.8
3
+ Version: 1.3.9
4
4
  Summary: Computing Littlewood-Richardson coefficients of Schubert polynomials
5
5
  Home-page: https://github.com/matthematics/schubmult
6
6
  Author: Matt Samuel
@@ -6,7 +6,7 @@ long_description = (this_directory / "README.md").read_text()
6
6
 
7
7
  setup(
8
8
  name="schubmult",
9
- version="1.3.8",
9
+ version="1.3.9",
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