Non-symmetric Macdonald Polynomials¶
- class sage.combinat.sf.ns_macdonald.AugmentedLatticeDiagramFilling(l, pi=None)[source]¶
- Bases: - CombinatorialObject- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: a == loads(dumps(a)) True sage: pi = Permutation([2,3,1]).to_permutation_group_element() sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]],pi) sage: a == loads(dumps(a)) True - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> a == loads(dumps(a)) True >>> pi = Permutation([Integer(2),Integer(3),Integer(1)]).to_permutation_group_element() >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]],pi) >>> a == loads(dumps(a)) True - are_attacking(i, j, ii, jj)[source]¶
- Return - Trueif the boxes- (i,j)and- (ii,jj)in- selfare attacking.- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: all( a.are_attacking(i,j,ii,jj) for (i,j),(ii,jj) in a.attacking_boxes()) True sage: a.are_attacking(1,1,3,2) False - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> all( a.are_attacking(i,j,ii,jj) for (i,j),(ii,jj) in a.attacking_boxes()) True >>> a.are_attacking(Integer(1),Integer(1),Integer(3),Integer(2)) False 
 - attacking_boxes()[source]¶
- Return a list of pairs of boxes in - selfthat are attacking.- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: a.attacking_boxes()[:5] [((1, 1), (2, 1)), ((1, 1), (3, 1)), ((1, 1), (6, 1)), ((1, 1), (2, 0)), ((1, 1), (3, 0))] - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> a.attacking_boxes()[:Integer(5)] [((1, 1), (2, 1)), ((1, 1), (3, 1)), ((1, 1), (6, 1)), ((1, 1), (2, 0)), ((1, 1), (3, 0))] 
 - boxes()[source]¶
- Return a list of the coordinates of the boxes of - self, including the ‘basement row’.- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: a.boxes() [(1, 1), (1, 2), (2, 1), (3, 1), (3, 2), (3, 3), (6, 1), (6, 2), (1, 0), (2, 0), (3, 0), (4, 0), (5, 0), (6, 0)] - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> a.boxes() [(1, 1), (1, 2), (2, 1), (3, 1), (3, 2), (3, 3), (6, 1), (6, 2), (1, 0), (2, 0), (3, 0), (4, 0), (5, 0), (6, 0)] 
 - coeff(q, t)[source]¶
- Return the coefficient in front of - selfin the HHL formula for the expansion of the non-symmetric Macdonald polynomial E(self.shape()).- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: q,t = var('q,t') # needs sage.symbolic sage: a.coeff(q,t) # needs sage.symbolic (t - 1)^4/((q^2*t^3 - 1)^2*(q*t^2 - 1)^2) - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> q,t = var('q,t') # needs sage.symbolic >>> a.coeff(q,t) # needs sage.symbolic (t - 1)^4/((q^2*t^3 - 1)^2*(q*t^2 - 1)^2) 
 - coeff_integral(q, t)[source]¶
- Return the coefficient in front of - selfin the HHL formula for the expansion of the integral non-symmetric Macdonald polynomial E(self.shape())- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: q,t = var('q,t') # needs sage.symbolic sage: a.coeff_integral(q,t) # needs sage.symbolic (q^2*t^3 - 1)^2*(q*t^2 - 1)^2*(t - 1)^4 - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> q,t = var('q,t') # needs sage.symbolic >>> a.coeff_integral(q,t) # needs sage.symbolic (q^2*t^3 - 1)^2*(q*t^2 - 1)^2*(t - 1)^4 
 - coinv()[source]¶
- Return - self’s co-inversion statistic.- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: a.coinv() 2 - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> a.coinv() 2 
 - descents()[source]¶
- Return a list of the descents of - self.- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: a.descents() [(1, 2), (3, 2)] - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> a.descents() [(1, 2), (3, 2)] 
 - inv()[source]¶
- Return - self’s inversion statistic.- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: a.inv() 15 - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> a.inv() 15 
 - inversions()[source]¶
- Return a list of the inversions of - self.- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: a.inversions()[:5] [((6, 2), (3, 2)), ((1, 2), (6, 1)), ((1, 2), (3, 1)), ((1, 2), (2, 1)), ((6, 1), (3, 1))] sage: len(a.inversions()) 25 - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> a.inversions()[:Integer(5)] [((6, 2), (3, 2)), ((1, 2), (6, 1)), ((1, 2), (3, 1)), ((1, 2), (2, 1)), ((6, 1), (3, 1))] >>> len(a.inversions()) 25 
 - is_non_attacking()[source]¶
- Return - Trueif- selfis non-attacking.- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: a.is_non_attacking() True sage: a = AugmentedLatticeDiagramFilling([[1, 1, 1], [2, 3], [3]]) sage: a.is_non_attacking() False sage: a = AugmentedLatticeDiagramFilling([[2,2],[1]]) sage: a.is_non_attacking() False sage: pi = Permutation([2,1]).to_permutation_group_element() sage: a = AugmentedLatticeDiagramFilling([[2,2],[1]],pi) sage: a.is_non_attacking() True - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> a.is_non_attacking() True >>> a = AugmentedLatticeDiagramFilling([[Integer(1), Integer(1), Integer(1)], [Integer(2), Integer(3)], [Integer(3)]]) >>> a.is_non_attacking() False >>> a = AugmentedLatticeDiagramFilling([[Integer(2),Integer(2)],[Integer(1)]]) >>> a.is_non_attacking() False >>> pi = Permutation([Integer(2),Integer(1)]).to_permutation_group_element() >>> a = AugmentedLatticeDiagramFilling([[Integer(2),Integer(2)],[Integer(1)]],pi) >>> a.is_non_attacking() True 
 - maj()[source]¶
- Return the major index of - self.- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: a.maj() 3 - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> a.maj() 3 
 - permuted_filling(sigma)[source]¶
- EXAMPLES: - sage: pi=Permutation([2,1,4,3]).to_permutation_group_element() sage: fill=[[2],[1,2,3],[],[3,1]] sage: AugmentedLatticeDiagramFilling(fill).permuted_filling(pi) [[2, 1], [1, 2, 1, 4], [4], [3, 4, 2]] - >>> from sage.all import * >>> pi=Permutation([Integer(2),Integer(1),Integer(4),Integer(3)]).to_permutation_group_element() >>> fill=[[Integer(2)],[Integer(1),Integer(2),Integer(3)],[],[Integer(3),Integer(1)]] >>> AugmentedLatticeDiagramFilling(fill).permuted_filling(pi) [[2, 1], [1, 2, 1, 4], [4], [3, 4, 2]] 
 - reading_order()[source]¶
- Return a list of coordinates of the boxes in - self, starting from the top right, and reading from right to left.- Note that this includes the ‘basement row’ of - self.- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: a.reading_order() [(3, 3), (6, 2), (3, 2), (1, 2), (6, 1), (3, 1), (2, 1), (1, 1), (6, 0), (5, 0), (4, 0), (3, 0), (2, 0), (1, 0)] - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> a.reading_order() [(3, 3), (6, 2), (3, 2), (1, 2), (6, 1), (3, 1), (2, 1), (1, 1), (6, 0), (5, 0), (4, 0), (3, 0), (2, 0), (1, 0)] 
 - reading_word()[source]¶
- Return the reading word of - self, obtained by reading the boxes entries of- selffrom right to left, starting in the upper right.- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: a.reading_word() word: 25465321 - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> a.reading_word() word: 25465321 
 - shape()[source]¶
- Return the shape of - self.- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: a.shape() [2, 1, 3, 0, 0, 2] - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> a.shape() [2, 1, 3, 0, 0, 2] 
 - weight()[source]¶
- Return the weight of - self.- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: a.weight() [1, 2, 1, 1, 2, 1] - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> a.weight() [1, 2, 1, 1, 2, 1] 
 
- sage.combinat.sf.ns_macdonald.E(mu, q=None, t=None, pi=None)[source]¶
- Return the non-symmetric Macdonald polynomial in type A corresponding to a shape - mu, with basement permuted according to- pi.- Note that if both \(q\) and \(t\) are specified, then they must have the same parent. - REFERENCE: - J. Haglund, M. Haiman, N. Loehr. A combinatorial formula for non-symmetric Macdonald polynomials. arXiv math/0601693v3. 
 - See also - NonSymmetricMacdonaldPolynomialsfor a type free implementation where the polynomials are constructed recursively by the application of intertwining operators.- EXAMPLES: - sage: from sage.combinat.sf.ns_macdonald import E sage: E([0,0,0]) 1 sage: E([1,0,0]) x0 sage: E([0,1,0]) (t - 1)/(q*t^2 - 1)*x0 + x1 sage: E([0,0,1]) (t - 1)/(q*t - 1)*x0 + (t - 1)/(q*t - 1)*x1 + x2 sage: E([1,1,0]) x0*x1 sage: E([1,0,1]) (t - 1)/(q*t^2 - 1)*x0*x1 + x0*x2 sage: E([0,1,1]) (t - 1)/(q*t - 1)*x0*x1 + (t - 1)/(q*t - 1)*x0*x2 + x1*x2 sage: E([2,0,0]) x0^2 + (q*t - q)/(q*t - 1)*x0*x1 + (q*t - q)/(q*t - 1)*x0*x2 sage: E([0,2,0]) (t - 1)/(q^2*t^2 - 1)*x0^2 + (q^2*t^3 - q^2*t^2 + q*t^2 - 2*q*t + q - t + 1)/(q^3*t^3 - q^2*t^2 - q*t + 1)*x0*x1 + x1^2 + (q*t^2 - 2*q*t + q)/(q^3*t^3 - q^2*t^2 - q*t + 1)*x0*x2 + (q*t - q)/(q*t - 1)*x1*x2 - >>> from sage.all import * >>> from sage.combinat.sf.ns_macdonald import E >>> E([Integer(0),Integer(0),Integer(0)]) 1 >>> E([Integer(1),Integer(0),Integer(0)]) x0 >>> E([Integer(0),Integer(1),Integer(0)]) (t - 1)/(q*t^2 - 1)*x0 + x1 >>> E([Integer(0),Integer(0),Integer(1)]) (t - 1)/(q*t - 1)*x0 + (t - 1)/(q*t - 1)*x1 + x2 >>> E([Integer(1),Integer(1),Integer(0)]) x0*x1 >>> E([Integer(1),Integer(0),Integer(1)]) (t - 1)/(q*t^2 - 1)*x0*x1 + x0*x2 >>> E([Integer(0),Integer(1),Integer(1)]) (t - 1)/(q*t - 1)*x0*x1 + (t - 1)/(q*t - 1)*x0*x2 + x1*x2 >>> E([Integer(2),Integer(0),Integer(0)]) x0^2 + (q*t - q)/(q*t - 1)*x0*x1 + (q*t - q)/(q*t - 1)*x0*x2 >>> E([Integer(0),Integer(2),Integer(0)]) (t - 1)/(q^2*t^2 - 1)*x0^2 + (q^2*t^3 - q^2*t^2 + q*t^2 - 2*q*t + q - t + 1)/(q^3*t^3 - q^2*t^2 - q*t + 1)*x0*x1 + x1^2 + (q*t^2 - 2*q*t + q)/(q^3*t^3 - q^2*t^2 - q*t + 1)*x0*x2 + (q*t - q)/(q*t - 1)*x1*x2 
- sage.combinat.sf.ns_macdonald.E_integral(mu, q=None, t=None, pi=None)[source]¶
- Return the integral form for the non-symmetric Macdonald polynomial in type A corresponding to a shape mu. - Note that if both q and t are specified, then they must have the same parent. - REFERENCE: - J. Haglund, M. Haiman, N. Loehr. A combinatorial formula for non-symmetric Macdonald polynomials. arXiv math/0601693v3. 
 - EXAMPLES: - sage: from sage.combinat.sf.ns_macdonald import E_integral sage: E_integral([0,0,0]) 1 sage: E_integral([1,0,0]) (-t + 1)*x0 sage: E_integral([0,1,0]) (-q*t^2 + 1)*x0 + (-t + 1)*x1 sage: E_integral([0,0,1]) (-q*t + 1)*x0 + (-q*t + 1)*x1 + (-t + 1)*x2 sage: E_integral([1,1,0]) (t^2 - 2*t + 1)*x0*x1 sage: E_integral([1,0,1]) (q*t^3 - q*t^2 - t + 1)*x0*x1 + (t^2 - 2*t + 1)*x0*x2 sage: E_integral([0,1,1]) (q^2*t^3 + q*t^4 - q*t^3 - q*t^2 - q*t - t^2 + t + 1)*x0*x1 + (q*t^2 - q*t - t + 1)*x0*x2 + (t^2 - 2*t + 1)*x1*x2 sage: E_integral([2,0,0]) (t^2 - 2*t + 1)*x0^2 + (q^2*t^2 - q^2*t - q*t + q)*x0*x1 + (q^2*t^2 - q^2*t - q*t + q)*x0*x2 sage: E_integral([0,2,0]) (q^2*t^3 - q^2*t^2 - t + 1)*x0^2 + (q^4*t^3 - q^3*t^2 - q^2*t + q*t^2 - q*t + q - t + 1)*x0*x1 + (t^2 - 2*t + 1)*x1^2 + (q^4*t^3 - q^3*t^2 - q^2*t + q)*x0*x2 + (q^2*t^2 - q^2*t - q*t + q)*x1*x2 - >>> from sage.all import * >>> from sage.combinat.sf.ns_macdonald import E_integral >>> E_integral([Integer(0),Integer(0),Integer(0)]) 1 >>> E_integral([Integer(1),Integer(0),Integer(0)]) (-t + 1)*x0 >>> E_integral([Integer(0),Integer(1),Integer(0)]) (-q*t^2 + 1)*x0 + (-t + 1)*x1 >>> E_integral([Integer(0),Integer(0),Integer(1)]) (-q*t + 1)*x0 + (-q*t + 1)*x1 + (-t + 1)*x2 >>> E_integral([Integer(1),Integer(1),Integer(0)]) (t^2 - 2*t + 1)*x0*x1 >>> E_integral([Integer(1),Integer(0),Integer(1)]) (q*t^3 - q*t^2 - t + 1)*x0*x1 + (t^2 - 2*t + 1)*x0*x2 >>> E_integral([Integer(0),Integer(1),Integer(1)]) (q^2*t^3 + q*t^4 - q*t^3 - q*t^2 - q*t - t^2 + t + 1)*x0*x1 + (q*t^2 - q*t - t + 1)*x0*x2 + (t^2 - 2*t + 1)*x1*x2 >>> E_integral([Integer(2),Integer(0),Integer(0)]) (t^2 - 2*t + 1)*x0^2 + (q^2*t^2 - q^2*t - q*t + q)*x0*x1 + (q^2*t^2 - q^2*t - q*t + q)*x0*x2 >>> E_integral([Integer(0),Integer(2),Integer(0)]) (q^2*t^3 - q^2*t^2 - t + 1)*x0^2 + (q^4*t^3 - q^3*t^2 - q^2*t + q*t^2 - q*t + q - t + 1)*x0*x1 + (t^2 - 2*t + 1)*x1^2 + (q^4*t^3 - q^3*t^2 - q^2*t + q)*x0*x2 + (q^2*t^2 - q^2*t - q*t + q)*x1*x2 
- sage.combinat.sf.ns_macdonald.Ht(mu, q=None, t=None, pi=None)[source]¶
- Return the symmetric Macdonald polynomial using the Haiman, Haglund, and Loehr formula. - Note that if both \(q\) and \(t\) are specified, then they must have the same parent. - REFERENCE: - J. Haglund, M. Haiman, N. Loehr. A combinatorial formula for non-symmetric Macdonald polynomials. arXiv math/0601693v3. 
 - EXAMPLES: - sage: from sage.combinat.sf.ns_macdonald import Ht sage: HHt = SymmetricFunctions(QQ['q','t'].fraction_field()).macdonald().Ht() sage: Ht([0,0,1]) x0 + x1 + x2 sage: HHt([1]).expand(3) x0 + x1 + x2 sage: Ht([0,0,2]) x0^2 + (q + 1)*x0*x1 + x1^2 + (q + 1)*x0*x2 + (q + 1)*x1*x2 + x2^2 sage: HHt([2]).expand(3) x0^2 + (q + 1)*x0*x1 + x1^2 + (q + 1)*x0*x2 + (q + 1)*x1*x2 + x2^2 - >>> from sage.all import * >>> from sage.combinat.sf.ns_macdonald import Ht >>> HHt = SymmetricFunctions(QQ['q','t'].fraction_field()).macdonald().Ht() >>> Ht([Integer(0),Integer(0),Integer(1)]) x0 + x1 + x2 >>> HHt([Integer(1)]).expand(Integer(3)) x0 + x1 + x2 >>> Ht([Integer(0),Integer(0),Integer(2)]) x0^2 + (q + 1)*x0*x1 + x1^2 + (q + 1)*x0*x2 + (q + 1)*x1*x2 + x2^2 >>> HHt([Integer(2)]).expand(Integer(3)) x0^2 + (q + 1)*x0*x1 + x1^2 + (q + 1)*x0*x2 + (q + 1)*x1*x2 + x2^2 
- class sage.combinat.sf.ns_macdonald.LatticeDiagram(l, copy=True)[source]¶
- Bases: - CombinatorialObject- a(i, j)[source]¶
- Return the length of the arm of the box - (i,j)in- self.- EXAMPLES: - sage: a = LatticeDiagram([3,1,2,4,3,0,4,2,3]) sage: a.a(5,2) 3 - >>> from sage.all import * >>> a = LatticeDiagram([Integer(3),Integer(1),Integer(2),Integer(4),Integer(3),Integer(0),Integer(4),Integer(2),Integer(3)]) >>> a.a(Integer(5),Integer(2)) 3 
 - arm(i, j)[source]¶
- Return the arm of the box - (i,j)in- self.- EXAMPLES: - sage: a = LatticeDiagram([3,1,2,4,3,0,4,2,3]) sage: a.arm(5,2) [(1, 2), (3, 2), (8, 1)] - >>> from sage.all import * >>> a = LatticeDiagram([Integer(3),Integer(1),Integer(2),Integer(4),Integer(3),Integer(0),Integer(4),Integer(2),Integer(3)]) >>> a.arm(Integer(5),Integer(2)) [(1, 2), (3, 2), (8, 1)] 
 - arm_left(i, j)[source]¶
- Return the left arm of the box - (i,j)in- self.- EXAMPLES: - sage: a = LatticeDiagram([3,1,2,4,3,0,4,2,3]) sage: a.arm_left(5,2) [(1, 2), (3, 2)] - >>> from sage.all import * >>> a = LatticeDiagram([Integer(3),Integer(1),Integer(2),Integer(4),Integer(3),Integer(0),Integer(4),Integer(2),Integer(3)]) >>> a.arm_left(Integer(5),Integer(2)) [(1, 2), (3, 2)] 
 - arm_right(i, j)[source]¶
- Return the right arm of the box - (i,j)in- self.- EXAMPLES: - sage: a = LatticeDiagram([3,1,2,4,3,0,4,2,3]) sage: a.arm_right(5,2) [(8, 1)] - >>> from sage.all import * >>> a = LatticeDiagram([Integer(3),Integer(1),Integer(2),Integer(4),Integer(3),Integer(0),Integer(4),Integer(2),Integer(3)]) >>> a.arm_right(Integer(5),Integer(2)) [(8, 1)] 
 - boxes()[source]¶
- EXAMPLES: - sage: a = LatticeDiagram([3,0,2]) sage: a.boxes() [(1, 1), (1, 2), (1, 3), (3, 1), (3, 2)] sage: a = LatticeDiagram([2, 1, 3, 0, 0, 2]) sage: a.boxes() [(1, 1), (1, 2), (2, 1), (3, 1), (3, 2), (3, 3), (6, 1), (6, 2)] - >>> from sage.all import * >>> a = LatticeDiagram([Integer(3),Integer(0),Integer(2)]) >>> a.boxes() [(1, 1), (1, 2), (1, 3), (3, 1), (3, 2)] >>> a = LatticeDiagram([Integer(2), Integer(1), Integer(3), Integer(0), Integer(0), Integer(2)]) >>> a.boxes() [(1, 1), (1, 2), (2, 1), (3, 1), (3, 2), (3, 3), (6, 1), (6, 2)] 
 - boxes_same_and_lower_right(ii, jj)[source]¶
- Return an iterator of the boxes of - selfthat are in row- jjbut not identical with- (ii, jj), or lie in the row- jj - 1(the row directly below- jj; this might be the basement) and strictly to the right of- (ii, jj).- EXAMPLES: - sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: a = a.shape() sage: list(a.boxes_same_and_lower_right(1,1)) [(2, 1), (3, 1), (6, 1), (2, 0), (3, 0), (4, 0), (5, 0), (6, 0)] sage: list(a.boxes_same_and_lower_right(1,2)) [(3, 2), (6, 2), (2, 1), (3, 1), (6, 1)] sage: list(a.boxes_same_and_lower_right(3,3)) [(6, 2)] sage: list(a.boxes_same_and_lower_right(2,3)) [(3, 3), (3, 2), (6, 2)] - >>> from sage.all import * >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> a = a.shape() >>> list(a.boxes_same_and_lower_right(Integer(1),Integer(1))) [(2, 1), (3, 1), (6, 1), (2, 0), (3, 0), (4, 0), (5, 0), (6, 0)] >>> list(a.boxes_same_and_lower_right(Integer(1),Integer(2))) [(3, 2), (6, 2), (2, 1), (3, 1), (6, 1)] >>> list(a.boxes_same_and_lower_right(Integer(3),Integer(3))) [(6, 2)] >>> list(a.boxes_same_and_lower_right(Integer(2),Integer(3))) [(3, 3), (3, 2), (6, 2)] 
 - flip()[source]¶
- Return the flip of - self, where flip is defined as follows. Let- r = max(self). Then- self.flip()[i] = r - self[i].- EXAMPLES: - sage: a = LatticeDiagram([3,0,2]) sage: a.flip() [0, 3, 1] - >>> from sage.all import * >>> a = LatticeDiagram([Integer(3),Integer(0),Integer(2)]) >>> a.flip() [0, 3, 1] 
 - l(i, j)[source]¶
- Return - self[i] - j.- EXAMPLES: - sage: a = LatticeDiagram([3,1,2,4,3,0,4,2,3]) sage: a.l(5,2) 1 - >>> from sage.all import * >>> a = LatticeDiagram([Integer(3),Integer(1),Integer(2),Integer(4),Integer(3),Integer(0),Integer(4),Integer(2),Integer(3)]) >>> a.l(Integer(5),Integer(2)) 1 
 - leg(i, j)[source]¶
- Return the leg of the box - (i,j)in- self.- EXAMPLES: - sage: a = LatticeDiagram([3,1,2,4,3,0,4,2,3]) sage: a.leg(5,2) [(5, 3)] - >>> from sage.all import * >>> a = LatticeDiagram([Integer(3),Integer(1),Integer(2),Integer(4),Integer(3),Integer(0),Integer(4),Integer(2),Integer(3)]) >>> a.leg(Integer(5),Integer(2)) [(5, 3)] 
 
- class sage.combinat.sf.ns_macdonald.NonattackingBacktracker(shape, pi=None)[source]¶
- Bases: - GenericBacktracker- EXAMPLES: - sage: from sage.combinat.sf.ns_macdonald import NonattackingBacktracker sage: n = NonattackingBacktracker(LatticeDiagram([0,1,2])) sage: n._ending_position (3, 2) sage: n._initial_state (2, 1) - >>> from sage.all import * >>> from sage.combinat.sf.ns_macdonald import NonattackingBacktracker >>> n = NonattackingBacktracker(LatticeDiagram([Integer(0),Integer(1),Integer(2)])) >>> n._ending_position (3, 2) >>> n._initial_state (2, 1) - get_next_pos(ii, jj)[source]¶
- EXAMPLES: - sage: from sage.combinat.sf.ns_macdonald import NonattackingBacktracker sage: a = AugmentedLatticeDiagramFilling([[1,6],[2],[3,4,2],[],[],[5,5]]) sage: n = NonattackingBacktracker(a.shape()) sage: n.get_next_pos(1, 1) (2, 1) sage: n.get_next_pos(6, 1) (1, 2) sage: n = NonattackingBacktracker(LatticeDiagram([2,2,2])) sage: n.get_next_pos(3, 1) (1, 2) - >>> from sage.all import * >>> from sage.combinat.sf.ns_macdonald import NonattackingBacktracker >>> a = AugmentedLatticeDiagramFilling([[Integer(1),Integer(6)],[Integer(2)],[Integer(3),Integer(4),Integer(2)],[],[],[Integer(5),Integer(5)]]) >>> n = NonattackingBacktracker(a.shape()) >>> n.get_next_pos(Integer(1), Integer(1)) (2, 1) >>> n.get_next_pos(Integer(6), Integer(1)) (1, 2) >>> n = NonattackingBacktracker(LatticeDiagram([Integer(2),Integer(2),Integer(2)])) >>> n.get_next_pos(Integer(3), Integer(1)) (1, 2) 
 
- sage.combinat.sf.ns_macdonald.NonattackingFillings(shape, pi=None)[source]¶
- Returning the finite set of nonattacking fillings of a given shape. - EXAMPLES: - sage: NonattackingFillings([0,1,2]) Nonattacking fillings of [0, 1, 2] sage: NonattackingFillings([0,1,2]).list() [[[1], [2, 1], [3, 2, 1]], [[1], [2, 1], [3, 2, 2]], [[1], [2, 1], [3, 2, 3]], [[1], [2, 1], [3, 3, 1]], [[1], [2, 1], [3, 3, 2]], [[1], [2, 1], [3, 3, 3]], [[1], [2, 2], [3, 1, 1]], [[1], [2, 2], [3, 1, 2]], [[1], [2, 2], [3, 1, 3]], [[1], [2, 2], [3, 3, 1]], [[1], [2, 2], [3, 3, 2]], [[1], [2, 2], [3, 3, 3]]] - >>> from sage.all import * >>> NonattackingFillings([Integer(0),Integer(1),Integer(2)]) Nonattacking fillings of [0, 1, 2] >>> NonattackingFillings([Integer(0),Integer(1),Integer(2)]).list() [[[1], [2, 1], [3, 2, 1]], [[1], [2, 1], [3, 2, 2]], [[1], [2, 1], [3, 2, 3]], [[1], [2, 1], [3, 3, 1]], [[1], [2, 1], [3, 3, 2]], [[1], [2, 1], [3, 3, 3]], [[1], [2, 2], [3, 1, 1]], [[1], [2, 2], [3, 1, 2]], [[1], [2, 2], [3, 1, 3]], [[1], [2, 2], [3, 3, 1]], [[1], [2, 2], [3, 3, 2]], [[1], [2, 2], [3, 3, 3]]] 
- class sage.combinat.sf.ns_macdonald.NonattackingFillings_shape(shape, pi=None)[source]¶
- Bases: - Parent,- UniqueRepresentation- EXAMPLES: - sage: n = NonattackingFillings([0,1,2]) sage: n == loads(dumps(n)) True - >>> from sage.all import * >>> n = NonattackingFillings([Integer(0),Integer(1),Integer(2)]) >>> n == loads(dumps(n)) True