Ticket #13444: trac_13444-kschur-primer-as.patch

File trac_13444-kschur-primer-as.patch, 21.5 KB (added by aschilling, 10 years ago)
  • new file sage/tests/book_schilling_zabrocki_kschur_primer.py

    # HG changeset patch
    # User "sage-combinat script"
    # Date 1347345304 25200
    # Node ID 0203d905d931914c07250b453dc7ff266a6a298d
    # Parent 7c1eb38f925326d91e61f9477c3f5671b4386c81
    #13444: Doc tests for chapter "k-Schur primer" for the book "k-Schur functions and affine Schubert calculus"
    
    diff --git a/sage/tests/book_schilling_zabrocki_kschur_primer.py b/sage/tests/book_schilling_zabrocki_kschur_primer.py
    new file mode 100644
    - +  
     1r"""
     2This file contains doctests for the Chapter "k-Schur function primer"
     3for the book "k-Schur functions and affine Schubert calculus" for code
     4written by Anne Schilling and Mike Zabrocki, 2012
     5"""
     6
     7"""
     8Sage example in ./kschurnotes/notes-mike-anne.tex, line 178::
     9
     10    sage: P = Partitions(4); P
     11    Partitions of the integer 4
     12    sage: P.list()
     13    [[4], [3, 1], [2, 2], [2, 1, 1], [1, 1, 1, 1]]
     14
     15Sage example in ./kschurnotes/notes-mike-anne.tex, line 185::
     16
     17    sage: la=Partition([2,2]); mu=Partition([3,1])
     18    sage: mu.dominates(la)
     19    True
     20
     21Sage example in ./kschurnotes/notes-mike-anne.tex, line 191::
     22
     23    sage: ord = lambda x,y: y.dominates(x)
     24    sage: P = Poset([Partitions(6), ord], facade=True)
     25    sage: H = P.hasse_diagram()
     26
     27Sage example in ./kschurnotes/notes-mike-anne.tex, line 202::
     28
     29    sage: la=Partition([4,3,3,3,2,2,1])
     30    sage: la.conjugate()
     31    [7, 6, 4, 1]
     32    sage: la.k_split(4)
     33    [[4], [3, 3], [3, 2], [2, 1]]
     34
     35Sage example in ./kschurnotes/notes-mike-anne.tex, line 210::
     36
     37    sage: p = SkewPartition([[2,1],[1]])
     38    sage: p.is_connected()
     39    False
     40
     41Sage example in ./kschurnotes/notes-mike-anne.tex, line 484::
     42
     43    sage: la = Partition([4,3,3,3,2,2,1])
     44    sage: kappa = la.k_skew(4); kappa
     45    [[12, 8, 5, 5, 2, 2, 1], [8, 5, 2, 2]]
     46
     47Sage example in ./kschurnotes/notes-mike-anne.tex, line 490::
     48
     49    sage: kappa.row_lengths()
     50    [4, 3, 3, 3, 2, 2, 1]
     51
     52Sage example in ./kschurnotes/notes-mike-anne.tex, line 495::
     53
     54    sage: tau = Core([12,8,5,5,2,2,1],5)
     55    sage: mu = tau.to_bounded_partition(); mu
     56    [4, 3, 3, 3, 2, 2, 1]
     57    sage: mu.to_core(4)
     58    [12, 8, 5, 5, 2, 2, 1]
     59
     60Sage example in ./kschurnotes/notes-mike-anne.tex, line 503::
     61
     62    sage: Cores(3,6).list()
     63    [[6, 4, 2], [5, 3, 1, 1], [4, 2, 2, 1, 1], [3, 3, 2, 2, 1, 1]]
     64
     65Sage example in ./kschurnotes/notes-mike-anne.tex, line 572::
     66
     67    sage: W = WeylGroup(['A',4,1])
     68    sage: S = W.simple_reflections()
     69    sage: [s.reduced_word() for s in S]
     70    [[0], [1], [2], [3], [4]]
     71
     72Sage example in ./kschurnotes/notes-mike-anne.tex, line 580::
     73
     74    sage: w = W.an_element(); w
     75    [ 2  0  0  1 -2]
     76    [ 2  0  0  0 -1]
     77    [ 1  1  0  0 -1]
     78    [ 1  0  1  0 -1]
     79    [ 1  0  0  1 -1]
     80    sage: w.reduced_word()
     81    [0, 1, 2, 3, 4]
     82    sage: w = W.from_reduced_word([2,1,0])
     83    sage: w.is_affine_grassmannian()
     84    True
     85
     86Sage example in ./kschurnotes/notes-mike-anne.tex, line 651::
     87
     88    sage: c = Core([7,3,1],5)
     89    sage: c.affine_symmetric_group_simple_action(2)
     90    [8, 4, 1, 1]
     91    sage: c.affine_symmetric_group_simple_action(0)
     92    [7, 3, 1]
     93
     94Sage example in ./kschurnotes/notes-mike-anne.tex, line 661::
     95
     96    sage: k=4; length=3
     97    sage: W = WeylGroup(['A',k,1])
     98    sage: G = W.affine_grassmannian_elements_of_given_length(length)
     99    sage: [w.reduced_word() for w in G]
     100    [[2, 1, 0], [4, 1, 0], [3, 4, 0]]
     101
     102    sage: C = Cores(k+1,length)
     103    sage: [c.to_grassmannian().reduced_word() for c in C]
     104    [[2, 1, 0], [4, 1, 0], [3, 4, 0]]
     105
     106Sage example in ./kschurnotes/notes-mike-anne.tex, line 725::
     107
     108    sage: la = Partition([4,3,3,3,2,2,1])
     109    sage: c = la.to_core(4); c
     110    [12, 8, 5, 5, 2, 2, 1]
     111    sage: W = WeylGroup(['A',4,1])
     112    sage: w = W.from_reduced_word([4,1,0,2,1,4,3,2,0,4,3,1,0,4,3,2,1,0])
     113    sage: c.to_grassmannian() == w
     114    True
     115
     116Sage example in ./kschurnotes/notes-mike-anne.tex, line 769::
     117
     118    sage: la = Partition([4,3,3,3,2,2,1])
     119    sage: la.k_conjugate(4)
     120    [3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1]
     121
     122Sage example in ./kschurnotes/notes-mike-anne.tex, line 1080::
     123
     124    sage: c = Core([3,1,1],3)
     125    sage: c.weak_covers()
     126    [[4, 2, 1, 1]]
     127    sage: c.strong_covers()
     128    [[5, 3, 1], [4, 2, 1, 1], [3, 2, 2, 1, 1]]
     129
     130Sage example in ./kschurnotes/notes-mike-anne.tex, line 1088::
     131
     132    sage: kappa = Core([4,1],4)
     133    sage: tau = Core([2,1],4)
     134    sage: tau.weak_le(kappa)
     135    False
     136    sage: tau.strong_le(kappa)
     137    True
     138
     139Sage example in ./kschurnotes/notes-mike-anne.tex, line 1097::
     140
     141    sage: C = sum(([c for c in Cores(4,m)] for m in range(7)),[])
     142    sage: ord = lambda x,y: x.weak_le(y)
     143    sage: P = Poset([C, ord], cover_relations = False)
     144    sage: H = P.hasse_diagram()
     145    sage: view(H)        #optional
     146
     147Sage example in ./kschurnotes/notes-mike-anne.tex, line 1262::
     148
     149    sage: Sym = SymmetricFunctions(QQ)
     150    sage: h = Sym.homogeneous()
     151    sage: m = Sym.monomial()
     152
     153Sage example in ./kschurnotes/notes-mike-anne.tex, line 1268::
     154
     155    sage: f = h[3,1]+h[2,2]
     156    sage: m(f)
     157    10*m[1, 1, 1, 1] + 7*m[2, 1, 1] + 5*m[2, 2] + 4*m[3, 1] + 2*m[4]
     158
     159Sage example in ./kschurnotes/notes-mike-anne.tex, line 1275::
     160
     161    sage: f.scalar(h[2,1,1])
     162    7
     163    sage: m(f).coefficient([2,1,1])
     164    7
     165
     166Sage example in ./kschurnotes/notes-mike-anne.tex, line 1283::
     167
     168    sage: p = Sym.power()
     169    sage: e = Sym.elementary()
     170    sage: sum( (-1)**(i-1)*e[4-i]*p[i] for i in range(1,4) ) - p[4]
     171    4*e[4]
     172    sage: sum( (-1)**(i-1)*p[i]*e[4-i] for i in range(1,4) ) - p[4]
     173    1/6*p[1, 1, 1, 1] - p[2, 1, 1] + 1/2*p[2, 2] + 4/3*p[3, 1] - p[4]
     174
     175Sage example in ./kschurnotes/notes-mike-anne.tex, line 1366::
     176
     177    sage: Sym = SymmetricFunctions(QQ)
     178    sage: s = Sym.schur()
     179    sage: m = Sym.monomial()
     180    sage: h = Sym.homogeneous()
     181    sage: m(s[1,1,1])
     182    m[1, 1, 1]
     183    sage: h(s[1,1,1])
     184    h[1, 1, 1] - 2*h[2, 1] + h[3]
     185
     186Sage example in ./kschurnotes/notes-mike-anne.tex, line 1377::
     187
     188    sage: p = Sym.power()
     189    sage: s = Sym.schur()
     190    sage: p(s[1,1,1])
     191    1/6*p[1, 1, 1] - 1/2*p[2, 1] + 1/3*p[3]
     192    sage: p(s[2,1])
     193    1/3*p[1, 1, 1] - 1/3*p[3]
     194    sage: p(s[3])
     195    1/6*p[1, 1, 1] + 1/2*p[2, 1] + 1/3*p[3]
     196
     197Sage example in ./kschurnotes/notes-mike-anne.tex, line 1388::
     198
     199    sage: s[2,1].scalar(s[1,1,1])
     200    0
     201    sage: s[2,1].scalar(s[2,1])
     202    1
     203
     204Sage example in ./kschurnotes/notes-mike-anne.tex, line 1571::
     205
     206  sage: Sym = SymmetricFunctions(FractionField(QQ['t']))
     207  sage: Qp = Sym.hall_littlewood().Qp()
     208  sage: Qp.base_ring()
     209  Fraction Field of Univariate Polynomial Ring in t over Rational Field
     210  sage: s = Sym.schur()
     211  sage: s(Qp[1,1,1])
     212  s[1, 1, 1] + (t^2+t)*s[2, 1] + t^3*s[3]
     213
     214Sage example in ./kschurnotes/notes-mike-anne.tex, line 1584::
     215
     216  sage: t = Qp.t
     217  sage: s[2,1].scalar(s[3].theta_qt(t,0))
     218  t^2 - t
     219
     220Sage example in ./kschurnotes/notes-mike-anne.tex, line 1590::
     221
     222  sage: s(Qp([1,1])).hl_creation_operator([3])
     223  s[3, 1, 1] + t*s[3, 2] + (t^2+t)*s[4, 1] + t^3*s[5]
     224  sage: s(Qp([3,1,1]))
     225  s[3, 1, 1] + t*s[3, 2] + (t^2+t)*s[4, 1] + t^3*s[5]
     226
     227Sage example in ./kschurnotes/notes-mike-anne.tex, line 1619::
     228
     229  sage: Sym = SymmetricFunctions(FractionField(QQ['q,t']))
     230  sage: Mac = Sym.macdonald()
     231  sage: H = Mac.H()
     232  sage: s = Sym.schur()
     233  sage: for la in Partitions(3):
     234  ...     print "H", la, "=", s(H(la))
     235  H [3] = q^3*s[1, 1, 1] + (q^2+q)*s[2, 1] + s[3]
     236  H [2, 1] = q*s[1, 1, 1] + (q*t+1)*s[2, 1] + t*s[3]
     237  H [1, 1, 1] = s[1, 1, 1] + (t^2+t)*s[2, 1] + t^3*s[3]
     238
     239Sage example in ./kschurnotes/notes-mike-anne.tex, line 1632::
     240
     241  sage: Sym = SymmetricFunctions(FractionField(QQ['t']))
     242  sage: Mac = Sym.macdonald(q=0)
     243  sage: H = Mac.H()
     244  sage: s = Sym.schur()
     245  sage: for la in Partitions(3):
     246  ...    print "H",la, "=", s(H(la))
     247  H [3] = s[3]
     248  H [2, 1] = s[2, 1] + t*s[3]
     249  H [1, 1, 1] = s[1, 1, 1] + (t^2+t)*s[2, 1] + t^3*s[3]
     250  sage: Qp = Sym.hall_littlewood().Qp()
     251  sage: s(Qp[1, 1, 1])
     252  s[1, 1, 1] + (t^2+t)*s[2, 1] + t^3*s[3]
     253
     254Sage example in ./kschurnotes/notes-mike-anne.tex, line 1647::
     255
     256  sage: Sym = SymmetricFunctions(FractionField(QQ['q']))
     257  sage: Mac = Sym.macdonald(t=0)
     258  sage: H = Mac.H()
     259  sage: s = Sym.schur()
     260  sage: for la in Partitions(3):
     261  ...    print "H",la, "=", s(H(la))
     262  H [3] = q^3*s[1, 1, 1] + (q^2+q)*s[2, 1] + s[3]
     263  H [2, 1] = q*s[1, 1, 1] + s[2, 1]
     264  H [1, 1, 1] = s[1, 1, 1]
     265
     266Sage example in ./kschurnotes/notes-mike-anne.tex, line 1852::
     267
     268    sage: SemistandardTableaux([5,2],[4,2,1]).list()
     269    [[[1, 1, 1, 1, 2], [2, 3]], [[1, 1, 1, 1, 3], [2, 2]]]
     270
     271Sage example in ./kschurnotes/notes-mike-anne.tex, line 1857::
     272
     273    sage: P = Partitions(4)
     274    sage: P.list()
     275    [[4], [3, 1], [2, 2], [2, 1, 1], [1, 1, 1, 1]]
     276    sage: n = P.cardinality(); n
     277    5
     278    sage: K = matrix(QQ,n,n,
     279    ...           [[SemistandardTableaux(la,mu).cardinality()
     280    ...            for mu in P] for la in P])
     281    sage: K
     282    [1 1 1 1 1]
     283    [0 1 1 2 3]
     284    [0 0 1 1 2]
     285    [0 0 0 1 3]
     286    [0 0 0 0 1]
     287
     288Sage example in ./kschurnotes/notes-mike-anne.tex, line 1966::
     289
     290    sage: Sym = SymmetricFunctions(QQ)
     291    sage: ks4 = Sym.kschur(4,t=1)
     292    sage: h = Sym.homogeneous()
     293    sage: ks4(h[4,3,1])
     294    ks4[4, 3, 1] + ks4[4, 4]
     295
     296    sage: ks6 = Sym.kschur(6,t=1)
     297    sage: ks6(h[4,3,1])
     298    ks6[4, 3, 1] + ks6[4, 4] + ks6[5, 2, 1] + 2*ks6[5, 3]
     299      + ks6[6, 1, 1] + ks6[6, 2]
     300
     301Sage example in ./kschurnotes/notes-mike-anne.tex, line 1980::
     302
     303    sage: Sym = SymmetricFunctions(QQ)
     304    sage: ks = Sym.kschur(3,t=1)
     305    sage: ks.realization_of()
     306    3-bounded Symmetric Functions over Rational Field with t=1
     307    sage: s = Sym.schur()
     308    sage: s.realization_of()
     309    Symmetric Functions over Rational Field
     310
     311Sage example in ./kschurnotes/notes-mike-anne.tex, line 2077::
     312
     313    sage: Sym = SymmetricFunctions(QQ)
     314    sage: ks = Sym.kschur(3,t=1)
     315    sage: h = Sym.homogeneous()
     316    sage: for mu in Partitions(7, max_part =3):
     317    ...     print h(ks(mu))
     318    ...
     319    h[3, 3, 1]
     320    h[3, 2, 2] - h[3, 3, 1]
     321    h[3, 2, 1, 1] - h[3, 2, 2]
     322    h[3, 1, 1, 1, 1] - 2*h[3, 2, 1, 1] + h[3, 3, 1]
     323    h[2, 2, 2, 1] - h[3, 2, 1, 1] - h[3, 2, 2] + h[3, 3, 1]
     324    h[2, 2, 1, 1, 1] - 2*h[2, 2, 2, 1] - h[3, 1, 1, 1, 1]
     325        + 2*h[3, 2, 1, 1] + h[3, 2, 2] - h[3, 3, 1]
     326    h[2, 1, 1, 1, 1, 1] - 3*h[2, 2, 1, 1, 1] + 2*h[2, 2, 2, 1]
     327        + h[3, 2, 1, 1] - h[3, 2, 2]
     328    h[1, 1, 1, 1, 1, 1, 1] - 4*h[2, 1, 1, 1, 1, 1] + 4*h[2, 2, 1, 1, 1]
     329        + 2*h[3, 1, 1, 1, 1] - 4*h[3, 2, 1, 1] + h[3, 3, 1]
     330
     331Sage example in ./kschurnotes/notes-mike-anne.tex, line 2153::
     332
     333    sage: mu = Partition([3,2,1])
     334    sage: c = mu.to_core(3)
     335    sage: w = c.to_grassmannian()
     336    sage: w.stanley_symmetric_function()
     337    4*m[1, 1, 1, 1, 1, 1] + 3*m[2, 1, 1, 1, 1] + 2*m[2, 2, 1, 1]
     338        + m[2, 2, 2] + 2*m[3, 1, 1, 1] + m[3, 2, 1]
     339    sage: w.reduced_words()
     340    [[2, 0, 3, 2, 1, 0], [0, 2, 3, 2, 1, 0], [0, 3, 2, 3, 1, 0],
     341     [0, 3, 2, 1, 3, 0]]
     342
     343Sage example in ./kschurnotes/notes-mike-anne.tex, line 2202::
     344
     345    sage: Sym = SymmetricFunctions(QQ)
     346    sage: ks = Sym.kschur(3,t=1)
     347    sage: h = Sym.homogeneous()
     348    sage: c = Partition([3,2,1]).to_core(3)
     349    sage: f = c.to_grassmannian().stanley_symmetric_function()*h([1]); f
     350    28*m[1, 1, 1, 1, 1, 1, 1] + 19*m[2, 1, 1, 1, 1, 1] + 12*m[2, 2, 1, 1, 1]
     351    + 7*m[2, 2, 2, 1] + 11*m[3, 1, 1, 1, 1] + 6*m[3, 2, 1, 1] + 3*m[3, 2, 2]
     352    + 2*m[3, 3, 1] + 2*m[4, 1, 1, 1] + m[4, 2, 1]
     353    sage: for la in Partitions(7, max_part=3):
     354    ...    print la, f.scalar( ks(la) )
     355    [3, 3, 1] 2
     356    [3, 2, 2] 1
     357    [3, 2, 1, 1] 3
     358    [3, 1, 1, 1, 1] 1
     359    [2, 2, 2, 1] 0
     360    [2, 2, 1, 1, 1] 0
     361    [2, 1, 1, 1, 1, 1] 0
     362    [1, 1, 1, 1, 1, 1, 1] 0
     363
     364Sage example in ./kschurnotes/notes-mike-anne.tex, line 2225::
     365
     366    sage: S = [la for la in Partitions(7, max_part=3) if f.scalar(ks(la))>0]
     367    sage: for p in S:
     368    ...     print p, SkewPartition([p.to_core(3).to_partition(),c.to_partition()])
     369    ...
     370    [3, 3, 1] [[7, 4, 1], [5, 2, 1]]
     371    [3, 2, 2] [[5, 2, 2], [5, 2, 1]]
     372    [3, 2, 1, 1] [[6, 3, 1, 1], [5, 2, 1]]
     373    [3, 1, 1, 1, 1] [[5, 2, 1, 1, 1], [5, 2, 1]]
     374
     375Sage example in ./kschurnotes/notes-mike-anne.tex, line 2533::
     376
     377  sage: W = WeylGroup(['A',3,1])
     378  sage: [w.reduced_word() for w in W.pieri_factors()]
     379  [[], [0], [1], [2], [3], [1, 0], [2, 0], [0, 3], [2, 1], [3, 1], [3, 2],
     380   [2, 1, 0], [1, 0, 3], [0, 3, 2], [3, 2, 1]]
     381
     382Sage example in ./kschurnotes/notes-mike-anne.tex, line 2541::
     383
     384  sage: A = NilCoxeterAlgebra(WeylGroup(['A',3,1]), prefix = 'A')
     385  sage: A.homogeneous_noncommutative_variables([2])
     386  A1*A0 + A2*A0 + A0*A3 + A3*A2 + A3*A1 + A2*A1
     387
     388Sage example in ./kschurnotes/notes-mike-anne.tex, line 2548::
     389
     390  sage: A.k_schur_noncommutative_variables([2,2])
     391  A0*A3*A1*A0 + A3*A1*A2*A0 + A1*A2*A0*A1 + A3*A2*A0*A3 + A2*A0*A3*A1
     392  + A2*A3*A1*A2
     393
     394Sage example in ./kschurnotes/notes-mike-anne.tex, line 2555::
     395
     396  sage: Sym = SymmetricFunctions(ZZ)
     397  sage: ks = Sym.kschur(5,t=1)
     398  sage: ks[2,1]*ks[2,1]
     399  ks5[2, 2, 1, 1] + ks5[2, 2, 2] + ks5[3, 1, 1, 1] + 2*ks5[3, 2, 1]
     400  + ks5[3, 3] + ks5[4, 2]
     401
     402Sage example in ./kschurnotes/notes-mike-anne.tex, line 2683::
     403
     404    sage: la = Partition([2,2])
     405    sage: la.k_conjugate(2).conjugate()
     406    [4]
     407    sage: la = Partition([2,1,1])
     408    sage: la.k_conjugate(2).conjugate()
     409    [3, 1]
     410    sage: la = Partition([1,1,1,1])
     411    sage: la.k_conjugate(2).conjugate()
     412    [2, 2]
     413
     414Sage example in ./kschurnotes/notes-mike-anne.tex, line 2695::
     415
     416    sage: Sym = SymmetricFunctions(FractionField(QQ['t']))
     417    sage: ks = Sym.kschur(2)
     418    sage: ks[2,2].omega_t_inverse()
     419    1/t^2*ks2[1, 1, 1, 1]
     420    sage: ks[2,1,1].omega_t_inverse()
     421    1/t*ks2[2, 1, 1]
     422    sage: ks[1,1,1,1].omega_t_inverse()
     423    1/t^2*ks2[2, 2]
     424
     425Sage example in ./kschurnotes/notes-mike-anne.tex, line 2706::
     426
     427    sage: Sym = SymmetricFunctions(FractionField(QQ['q,t']))
     428    sage: H = Sym.macdonald().H()
     429    sage: ks = Sym.kschur(2)
     430    sage: ks(H[2,2])
     431    q^2*ks2[1, 1, 1, 1] + (q*t+q)*ks2[2, 1, 1] + ks2[2, 2]
     432    sage: ks(H[2,1,1])
     433    q*ks2[1, 1, 1, 1] + (q*t^2+1)*ks2[2, 1, 1] + t*ks2[2, 2]
     434    sage: ks(H[1,1,1,1])
     435    ks2[1, 1, 1, 1] + (t^3+t^2)*ks2[2, 1, 1] + t^4*ks2[2, 2]
     436
     437Sage example in ./kschurnotes/notes-mike-anne.tex, line 2858::
     438
     439    sage: t = Tableau([[1,1,1,2,3,7],[2,2,3,5],[3,4],[4,5],[6]])
     440    sage: t.charge()
     441    9
     442
     443Sage example in ./kschurnotes/notes-mike-anne.tex, line 3064::
     444
     445    sage: la = Partition([3,2,1,1])
     446    sage: la.k_atom(4)
     447    [[[1, 1, 1], [2, 2], [3], [4]], [[1, 1, 1, 4], [2, 2], [3]]]
     448
     449Sage example in ./kschurnotes/notes-mike-anne.tex, line 3163::
     450
     451    sage: s = SymmetricFunctions(QQ['t']).schur()
     452    sage: G1 = s[1]
     453    sage: G211 = G1.hl_creation_operator([2,1]); G211
     454    s[2, 1, 1] + t*s[2, 2] + t*s[3, 1]
     455    sage: G3211 = G211.hl_creation_operator([3]); G3211
     456    s[3, 2, 1, 1] + t*s[3, 2, 2] + t*s[3, 3, 1] + t*s[4, 1, 1, 1]
     457     + (2*t^2+t)*s[4, 2, 1] + t^2*s[4, 3] + (t^3+t^2)*s[5, 1, 1]
     458     + 2*t^3*s[5, 2] + t^4*s[6, 1]
     459
     460Sage example in ./kschurnotes/notes-mike-anne.tex, line 3529::
     461
     462    sage: Sym = SymmetricFunctions(FractionField(QQ['t']))
     463    sage: ks4 = Sym.kschur(4)
     464    sage: ks4([3, 1, 1]).hl_creation_operator([1])
     465    (t-1)*ks4[2, 2, 1, 1] + t^2*ks4[3, 1, 1, 1] + t^3*ks4[3, 2, 1]
     466     + (t^3-t^2)*ks4[3, 3] + t^4*ks4[4, 1, 1]
     467    sage: ks4([3, 1, 1]).hl_creation_operator([2])
     468    t*ks4[3, 2, 1, 1] + t^2*ks4[3, 3, 1] + t^2*ks4[4, 1, 1, 1]
     469     + t^3*ks4[4, 2, 1]
     470    sage: ks4([3, 1, 1]).hl_creation_operator([3])
     471    ks4[3, 3, 1, 1] + t*ks4[4, 2, 1, 1] + t^2*ks4[4, 3, 1]
     472    sage: ks4([3, 1, 1]).hl_creation_operator([4])
     473    ks4[4, 3, 1, 1]
     474
     475Sage example in ./kschurnotes/notes-mike-anne.tex, line 3596::
     476
     477    sage: Sym = SymmetricFunctions(FractionField(QQ['t']))
     478    sage: ks3 = Sym.kschur(3)
     479    sage: ks3([3,2]).omega()
     480    Traceback (most recent call last):
     481    ...
     482    ValueError: t^2*s[1, 1, 1, 1, 1] + t*s[2, 1, 1, 1] + s[2, 2, 1] is not
     483    in the image of Generic morphism:
     484    From: 3-bounded Symmetric Functions over Fraction Field of Univariate
     485    Polynomial Ring in t over Rational Field in the 3-Schur basis
     486    To:   Symmetric Functions over Fraction Field of Univariate Polynomial Ring
     487    in t over Rational Field in the Schur basis
     488
     489    sage: s = Sym.schur()
     490    sage: s(ks3[3,2])
     491    s[3, 2] + t*s[4, 1] + t^2*s[5]
     492    sage: t = s.base_ring().gen()
     493    sage: invert = lambda x: s.base_ring()(x.subs(t=1/t))
     494    sage: ks3(s(ks3([3,2])).omega().map_coefficients(invert))
     495    1/t^2*ks3[1, 1, 1, 1, 1]
     496
     497Sage example in ./kschurnotes/notes-mike-anne.tex, line 3618::
     498
     499    sage: ks3[3,2].omega_t_inverse()
     500    1/t^2*ks3[1, 1, 1, 1, 1]
     501
     502Sage example in ./kschurnotes/notes-mike-anne.tex, line 3786::
     503
     504    sage: Sym = SymmetricFunctions(FractionField(QQ['t']))
     505    sage: ks3 = Sym.kschur(3)
     506    sage: ks3[3,1].coproduct()
     507    ks3[] # ks3[3, 1] + ks3[1] # ks3[2, 1] + (t+1)*ks3[1] # ks3[3]
     508    + ks3[1, 1] # ks3[2] + ks3[2] # ks3[1, 1] + (t+1)*ks3[2] # ks3[2]
     509    + ks3[2, 1] # ks3[1] + (t+1)*ks3[3] # ks3[1]  + ks3[3, 1] # ks3[]
     510
     511Sage example in ./kschurnotes/notes-mike-anne.tex, line 3820::
     512
     513    sage: Sym = SymmetricFunctions(FractionField(QQ['t']))
     514    sage: ks2 = Sym.kschur(2)
     515    sage: ks3 = Sym.kschur(3)
     516    sage: ks5 = Sym.kschur(5)
     517    sage: ks5(ks3[2])*ks5(ks2[1])
     518    ks5[2, 1] + ks5[3]
     519    sage: ks5(ks3[2])*ks5(ks2[2,1])
     520    ks5[2, 2, 1] + ks5[3, 1, 1] + (t+1)*ks5[3, 2] + (t+1)*ks5[4, 1]
     521      + t*ks5[5]
     522
     523Sage example in ./kschurnotes/notes-mike-anne.tex, line 3875::
     524
     525    sage: Sym = SymmetricFunctions(FractionField(QQ['t']))
     526    sage: ks3 = Sym.kschur(3)
     527    sage: ks4 = Sym.kschur(4)
     528    sage: ks5 = Sym.kschur(5)
     529    sage: ks4(ks3[3,2,1,1])
     530    ks4[3, 2, 1, 1] + t*ks4[3, 3, 1] + t*ks4[4, 1, 1, 1] + t^2*ks4[4, 2, 1]
     531    sage: ks5(ks3[3,2,1,1])
     532    ks5[3, 2, 1, 1] + t*ks5[3, 3, 1] + t*ks5[4, 1, 1, 1] + t^2*ks5[4, 2, 1]
     533     + t^2*ks5[4, 3] + t^3*ks5[5, 1, 1]
     534
     535    sage: ks5(ks4[3,2,1,1])
     536    ks5[3, 2, 1, 1]
     537    sage: ks5(ks4[4,3,3,2,1,1])
     538    ks5[4, 3, 3, 2, 1, 1] + t*ks5[4, 4, 3, 1, 1, 1]
     539     + t^2*ks5[5, 3, 3, 1, 1, 1]
     540    sage: ks5(ks4[4,3,3,2,1,1,1])
     541    ks5[4, 3, 3, 2, 1, 1, 1] + t*ks5[4, 3, 3, 3, 1, 1]
     542     + t*ks5[4, 4, 3, 1, 1, 1, 1] + t^2*ks5[4, 4, 3, 2, 1, 1]
     543     + t^2*ks5[5, 3, 3, 1, 1, 1, 1] + t^3*ks5[5, 3, 3, 2, 1, 1]
     544     + t^4*ks5[5, 4, 3, 1, 1, 1]
     545
     546Sage example in ./kschurnotes/notes-mike-anne.tex, line 3942::
     547
     548    sage: Sym = SymmetricFunctions(FractionField(QQ['q,t']))
     549    sage: H = Sym.macdonald().H()
     550    sage: ks = Sym.kschur(3)
     551    sage: ks(H[3])
     552    q^3*ks3[1, 1, 1] + (q^2+q)*ks3[2, 1] + ks3[3]
     553    sage: ks(H[3,2])
     554    q^4*ks3[1, 1, 1, 1, 1] + (q^3*t+q^3+q^2)*ks3[2, 1, 1, 1]
     555     + (q^3*t+q^2*t+q^2+q)*ks3[2, 2, 1]
     556     + (q^2*t+q*t+q)*ks3[3, 1, 1] + ks3[3, 2]
     557    sage: ks(H[3,1,1])
     558    q^3*ks3[1, 1, 1, 1, 1] + (q^3*t^2+q^2+q)*ks3[2, 1, 1, 1]
     559     + (q^2*t^2+q^2*t+q*t+q)*ks3[2, 2, 1]
     560     + (q^2*t^2+q*t^2+1)*ks3[3, 1, 1] + t*ks3[3, 2]
     561
     562Sage example in ./kschurnotes/notes-mike-anne.tex, line 4047::
     563
     564    sage: la = Partition([2,1])
     565    sage: w = la.to_core(3).to_grassmannian()
     566    sage: f = w.stanley_symmetric_function(); f
     567    2*m[1, 1, 1] + m[2, 1]
     568
     569Sage example in ./kschurnotes/notes-mike-anne.tex, line 4055::
     570
     571    sage: Sym = SymmetricFunctions(QQ)
     572    sage: p = Sym.power()
     573    sage: ks3 = Sym.kschur(3,1)
     574    sage: for mu in Partitions(5, max_part=3):
     575    ...    print mu, (f*p[2]).scalar( ks3(mu) )
     576    [3, 2] 1
     577    [3, 1, 1] 1
     578    [2, 2, 1] 0
     579    [2, 1, 1, 1] -1
     580    [1, 1, 1, 1, 1] -1
     581
     582Sage example in ./kschurnotes/notes-mike-anne.tex, line 4153::
     583
     584    sage: R = QQ[I]; z4 = R.zeta(4)
     585    sage: Sym = SymmetricFunctions(R)
     586    sage: ks3z = Sym.kschur(3,t=z4)
     587    sage: ks3 = Sym.kschur(3,t=1)
     588    sage: p = Sym.p()
     589    sage: p(ks3z[2, 2, 2, 2, 2, 2, 2, 2])
     590    1/12*p[4, 4, 4, 4] + 1/4*p[8, 8] + (-1/3)*p[12, 4]
     591    sage: p(ks3[2,2])
     592    1/12*p[1, 1, 1, 1] + 1/4*p[2, 2] + (-1/3)*p[3, 1]
     593    sage: p(ks3[2,2]).plethysm(p[4])
     594    1/12*p[4, 4, 4, 4] + 1/4*p[8, 8] + (-1/3)*p[12, 4]
     595
     596Sage example in ./kschurnotes/notes-mike-anne.tex, line 4167::
     597
     598    sage: ks3z[3, 3, 3, 3]*ks3z[2, 1]
     599    ks3[3, 3, 3, 3, 2, 1]
     600
     601Sage example in ./kschurnotes/notes-mike-anne.tex, line 4328::
     602
     603    sage: Sym = SymmetricFunctions(QQ['t'].fraction_field())
     604    sage: HLQp = Sym.hall_littlewood().Qp()
     605    sage: HLP = Sym.hall_littlewood().P()
     606    sage: def dual_k_schur(k, la):
     607    ...     ks = Sym.kschur(k)
     608    ...     return sum( ks(HLQp(mu)).coefficient(la)*HLP(mu)
     609    ...         for mu in Partitions(add(la), max_part=k) )
     610    sage: ks3 = Sym.kschur(3)
     611    sage: f = dual_k_schur(3,[2,1,1])*dual_k_schur(3,[3,2,1])
     612    sage: for mu in Partitions(10,max_part=3):
     613    ...     print mu, f.scalar(ks3(mu))
     614    [3, 3, 3, 1] t^5 + 3*t^4 + 3*t^3 + 4*t^2 + 2*t + 1
     615    [3, 3, 2, 2] t^4 + t^3 + 3*t^2 + 2*t + 1
     616    [3, 3, 2, 1, 1] 2*t^5 + 3*t^4 + 5*t^3 + 6*t^2 + 4*t + 2
     617    [3, 3, 1, 1, 1, 1] t^5 + t^4 + 4*t^3 + 4*t^2 + 3*t + 1
     618    [3, 2, 2, 2, 1] t^4 + 3*t^3 + 4*t^2 + 3*t + 1
     619    [3, 2, 2, 1, 1, 1] 2*t^2 + t + 1
     620    [3, 2, 1, 1, 1, 1, 1] 2*t^5 + 3*t^4 + 4*t^3 + 3*t^2 + t
     621    [3, 1, 1, 1, 1, 1, 1, 1] t^5 + 2*t^4 + t^3
     622    [2, 2, 2, 2, 2] t^5 + 2*t^4 + 2*t^3 + t^2
     623    [2, 2, 2, 2, 1, 1] t^3 + t^2
     624    [2, 2, 2, 1, 1, 1, 1] t^4 + t^3 + t^2
     625    [2, 2, 1, 1, 1, 1, 1, 1] 0
     626    [2, 1, 1, 1, 1, 1, 1, 1, 1] t^7 + t^6
     627    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] 0
     628
     629Sage example in ./kschurnotes/notes-mike-anne.tex, line 4433::
     630
     631    sage: ks2 = SymmetricFunctions(QQ['t']).kschur(2)
     632    sage: HLQp = SymmetricFunctions(QQ['t']).hall_littlewood().Qp()
     633    sage: ks2( (HLQp(ks2[1,1])*HLQp(ks2[1])).restrict_parts(2) )
     634    ks2[1, 1, 1] + (-t+1)*ks2[2, 1]
     635
     636"""