@@ -933,7 +933,7 @@ def covers(x):
933933 @staticmethod
934934 def SSTPoset (s , f = None ):
935935 """
936- The poset on semistandard tableaux of shape ``s`` and largest
936+ The lattice poset on semistandard tableaux of shape ``s`` and largest
937937 entry ``f`` that is ordered by componentwise comparison of the
938938 entries.
939939
@@ -945,16 +945,18 @@ def SSTPoset(s, f=None):
945945 argument. If no maximal number is given, it will use
946946 the number of cells in the shape.
947947
948- NOTE: This is a basic implementation and most certainly
949- not the most efficient.
948+ .. NOTE::
949+
950+ This is a basic implementation and most certainly
951+ not the most efficient.
950952
951953 EXAMPLES::
952954
953955 sage: posets.SSTPoset([2,1])
954- Finite poset containing 8 elements
956+ Finite lattice containing 8 elements
955957
956958 sage: posets.SSTPoset([2,1],4)
957- Finite poset containing 20 elements
959+ Finite lattice containing 20 elements
958960
959961 sage: posets.SSTPoset([2,1],2).cover_relations()
960962 [[[[1, 1], [2]], [[1, 2], [2]]]]
@@ -968,22 +970,12 @@ def SSTPoset(s, f=None):
968970 from sage .combinat .tableau import SemistandardTableaux
969971
970972 def tableaux_is_less_than (a , b ):
971- atstring = []
972- btstring = []
973- for i in a :
974- atstring += i
975- for i in b :
976- btstring += i
977- for i in range (len (atstring )):
978- if atstring [i ] > btstring [i ]:
979- return False
980- return True
973+ return all (ix <= iy for x , y in zip (a , b ) for ix , iy in zip (x , y ))
974+
981975 if f is None :
982- f = 0
983- for i in s :
984- f += i
976+ f = sum (i for i in s )
985977 E = SemistandardTableaux (s , max_entry = f )
986- return Poset ((E , tableaux_is_less_than ))
978+ return LatticePoset ((E , tableaux_is_less_than ))
987979
988980 @staticmethod
989981 def StandardExample (n , facade = None ):
0 commit comments