Sage cell
Use this to test your code!
Rules
Apply the following rules while writing your submission.
- Emphasis
- ''italics''; '''bold'''; '''''bold italics'''''
- Bulleted lists
- * Item 1
Separate line
* Subitem 1
* Item 2 - Links
- [[target|linktext]] target must start with http://, https:// or with www.
- Links to statistics in the database
- [[St000001]]
- Links to arXiv papers
- new: [[arxiv:1401.3690]], old: [[arXiv:math/0011099]]
- Links to MathSciNet reviews
- [[mathscinet:3113227]] or [[MR3113227]]
- Links to zbMATH (formerly: Zentralblatt) reviews
- [[zbmath:0845.11001]]
- Links to OEIS sequences
- [[oeis:A000108]]
- Links to MathOverflow questions and answers
- [[mathoverflow:132338]] or [[MO132338]]
- Links to Wikipedia articles
- [[wikipedia:On-Line_Encyclopedia_of_Integer_Sequences]]
- Links to Mathworld articles
- [[mathworld:AdjacencyMatrix]]
- Digital Object Identifiers
- [[doi:10.1090/noti1029]]
- CiteSeerX Identifiers
- [[citeseer:10.1.1.150.1445]]
# edit this
def mapping(elt):
return elt.inverse()
# DON'T edit this
parent_initializer = Permutations
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(X):
return X.cycle_type()
# DON'T edit this
parent_initializer = Permutations
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(pi):
l = [(0,0)]
for i, e in enumerate(pi):
if e > l[-1][1]:
l.append((i,e))
l.append((len(pi), len(pi)))
D = []
for i in range(len(l)-2):
D.extend([1]*(l[i+1][1]-l[i][1])+[0]*(l[i+2][0]-l[i+1][0]))
return DyckWord(D)
# DON'T edit this
parent_initializer = Permutations
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return elt.descents_composition()
# DON'T edit this
parent_initializer = Permutations
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return RSK(elt, check_standard=True)[0]
# DON'T edit this
parent_initializer = Permutations
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(pi):
return SetPartition(pi.cycle_tuples())
# DON'T edit this
parent_initializer = Permutations
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(sigma):
return sigma.increasing_tree_shape()
# DON'T edit this
parent_initializer = Permutations
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Permutations
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Permutations
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
return elt.permutation_poset()
# DON'T edit this
parent_initializer = Permutations
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
return elt.to_alternating_sign_matrix()
# DON'T edit this
parent_initializer = Permutations
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Permutations
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Permutations
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(pi):
G = Graph([list(range(len(pi))), [(i, j) for i in range(len(pi)) for j in range(i+1, len(pi)) if pi[i] > pi[j]]])
return G.copy(immutable=True)
# DON'T edit this
parent_initializer = Permutations
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Permutations
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Permutations
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(pi):
return ParkingFunction(list(pi))
# DON'T edit this
parent_initializer = Permutations
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(pi):
C = [1 if all(pi[j] < pi[k]
for j in range(i)
for k in range(i, len(pi)))
else 0
for i in range(1, len(pi))]
return Words([0,1])(C)
# DON'T edit this
parent_initializer = Permutations
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Permutations
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Permutations
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(pi):
pi = list(pi)
return SignedPermutations(len(pi))(pi)
# DON'T edit this
parent_initializer = Permutations
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Permutations
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(pi):
n = len(pi)
intervals = [frozenset()]
for i in range(1, n+1):
for j in range(i, n+1):
interval = frozenset([pi(k) for k in range(i, j+1)])
if len(interval) == max(interval) - min(interval) + 1:
intervals.append(interval)
if len(intervals) > 22:
raise ValueError("Lattice is too large for this map")
return LatticePoset([intervals, lambda x,y: x.issubset(y)])
# DON'T edit this
parent_initializer = Permutations
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Permutations
element_repr = repr
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return elt.conjugate()
# DON'T edit this
parent_initializer = Partitions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return elt.to_dyck_word()
# DON'T edit this
parent_initializer = Partitions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
st = StandardTableaux(elt).first()
return st.reading_word_permutation().right_tableau()
# DON'T edit this
parent_initializer = Partitions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(pi):
return Word([p % 2 for p in pi])
# DON'T edit this
parent_initializer = Partitions
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(la):
return SkewPartition((la, []))
# DON'T edit this
parent_initializer = Partitions
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Partitions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7, 8, 9, 10]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return elt.to_noncrossing_permutation()
# DON'T edit this
parent_initializer = DyckWords
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
n = len(elt) // 2
res = []
for c in reversed(elt):
if c == 0:
n -= 1
else:
res.append(n)
return Partition(res)
# DON'T edit this
parent_initializer = DyckWords
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(D):
return D.reverse()
# DON'T edit this
parent_initializer = DyckWords
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(D):
return D.rise_composition()
# DON'T edit this
parent_initializer = DyckWords
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(D):
up_downs = [[],[]]
for i,step in enumerate(D,1):
up_downs[1-step].append(i)
return StandardTableau(up_downs)
# DON'T edit this
parent_initializer = DyckWords
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(D):
return SetPartition(D.to_noncrossing_partition())
# DON'T edit this
parent_initializer = DyckWords
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(D):
return D.to_binary_tree("1L0R")
# DON'T edit this
parent_initializer = DyckWords
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(D):
return PerfectMatching([(a+1, b) for a,b in D.tunnels()])
# DON'T edit this
parent_initializer = DyckWords
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = DyckWords
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(D):
D = DyckWord(D)
m = [a+i for i, a in enumerate(reversed(D.to_area_sequence()), 1)]
return Poset([list(range(1, D.semilength()+1)), lambda i, j: j > m[i-1]])
# DON'T edit this
parent_initializer = DyckWords
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(D):
n = D.semilength()
M = zero_matrix(ZZ,n)
H = D.heights()
for p in D.peaks():
P = D[:p]
(i, j) = P.count(1), P.count(0)
for k in range(H[p]+1):
M[(i-k,j+k)] = 1
for v in D.valleys():
P = D[:v+1]
(i, j) = P.count(1), P.count(0)
for k in range(H[v+1]):
M[(i-k-1,j+k)] = -1
return AlternatingSignMatrix(M)
# DON'T edit this
parent_initializer = DyckWords
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = DyckWords
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = DyckWords
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = DyckWords
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
levels = [OrderedTree().clone()]
for u in elt:
if u == 1:
levels.append(OrderedTree().clone())
else:
tree = levels.pop()
tree.set_immutable()
root = levels.pop()
root.append(tree)
levels.append(root)
root = levels[0]
root.set_immutable()
return root
# DON'T edit this
parent_initializer = DyckWords
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = DyckWords
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = DyckWords
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(w):
return Word(w)
# DON'T edit this
parent_initializer = DyckWords
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = DyckWords
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = DyckWords
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = DyckWords
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(D):
p = ParallelogramPolyomino.from_dyck_word(D)
return SkewPartitions(p.area()).from_row_and_column_length(p.widths()[::-1], p.heights())
# DON'T edit this
parent_initializer = DyckWords
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = DyckWords
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = DyckWords
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return Partition(sorted(elt, reverse=True))
# DON'T edit this
parent_initializer = Compositions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(c):
return DyckWord(sum([[1]*a + [0]*a for a in c], []))
# DON'T edit this
parent_initializer = Compositions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return elt.reversed()
# DON'T edit this
parent_initializer = Compositions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(c):
G = Graph()
for i in c:
v = G.add_vertex()
G.add_edges((u, v) for u in G.vertices() if u != v)
for j in range(i-1):
G.add_vertex()
return G.copy(immutable=True)
# DON'T edit this
parent_initializer = Compositions
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(w):
# we diverge from the SageMath convention for the empty
# composition to make the map graded in the strict sense
if w:
return Words([0,1])(w.to_code())
return Words([0,1])([])
# DON'T edit this
parent_initializer = Compositions
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(a):
return a.to_skew_partition()
# DON'T edit this
parent_initializer = Compositions
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = Compositions
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return Permutation(elt.standardization().to_word())
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return elt.shape()
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(T):
d = T.standard_descents()
c = [i for i in range(2, T.size()) if i in d and i-1 not in d]
return Composition(from_subset=(c, T.size()))
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(T):
return T.promotion()
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(T):
return SetPartition(T)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(T):
return T.to_Gelfand_Tsetlin_pattern()
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(X):
D = X.standard_descents()
w = [1 if i in D else 0 for i in range(1, X.size())]
return Words([0,1])(w)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = StandardTableaux
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return elt.to_permutation()
# DON'T edit this
parent_initializer = SetPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
return elt.shape()
# DON'T edit this
parent_initializer = SetPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(pi):
return Composition([len(b) for b in sorted([sorted(p) for p in pi])])
# DON'T edit this
parent_initializer = SetPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(x):
"""
Return the standard tableau associated to a set partition.
EXAMPLE::
sage: mapping([[1, 2], [3, 6, 7], [4, 5]])
[[1, 2, 7], [3, 5], [4, 6]]
"""
A = [sorted(a) for a in x]
m = max(len(a) for a in A)
if m==1:
return Tableau(sorted(a for a in A))
else:
last_row = sorted(a[-1] for a in A if len(a)==m)
l = len(last_row)
AA = [a[:m-1] for a in A]
TT = mapping(AA)
T = []
for i,r in enumerate(TT):
if i %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(pi):
n = pi.size()
return SetPartition([[n+1-b for b in B] for B in pi])
# DON'T edit this
parent_initializer = SetPartitions
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SetPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
return elt.to_132_avoiding_permutation()
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return elt.to_dyck_word("L1R0")
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
return elt.left_right_symmetry()
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
return elt.to_poset(with_leaves=False, root_to_leaf=False)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return elt.to_undirected_graph()
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
return elt.as_ordered_tree()
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = BinaryTrees
element_repr = repr
levels = [2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return elt.to_permutation()
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(m):
n = m.size()
return DyckWord([1 if m.partner(i) > i else 0 for i in range(1,n+1)])
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(pi):
return SetPartition(pi)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(M):
n = M.size()
return PerfectMatching([(a%n+1, b%n+1) for a,b in M])
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = PerfectMatchings
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
levels = [2, 4, 6, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
return Partition(elt)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Cores(x[1],x[0])
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
levels = [(2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(X):
return X.greene_shape()
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(X):
return X.dual()
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(P):
return P.incomparability_graph().copy(immutable=True)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(P):
if P.cardinality() > 20:
raise ValueError("Poset is too large for this map")
return P.completion_by_cuts()
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPosets():
def __iter__(self):
for P in Posets(n):
yield P
def cardinality(self):
l = [1, 1, 2, 5, 16, 63, 318, 2045, 16999, 183231, 2567284, 46749427, 1104891746, 33823827452, 1338193159771, 68275077901156, 4483130665195087]
if n < len(l):
return l[n]
else:
return Infinity
return MyPosets()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
return elt.left_key().to_permutation()
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
MT = elt.to_monotone_triangle()
nplus = elt._matrix.nrows() + 1
parkfn = [nplus - row[0] for row in list(MT) if len(row) > 0]
return NonDecreasingParkingFunction(parkfn).to_dyck_word().reverse()
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(A):
return PerfectMatching(FullyPackedLoop(A).link_pattern())
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
return elt.gyration()
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
return elt.to_semistandard_tableau()
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = AlternatingSignMatrices
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(p):
return GelfandTsetlinPatterns(len(p))(p.to_tableau().promotion(len(p)-1))
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
ret = []
for i, row in enumerate(reversed(elt)):
for j, val in enumerate(row):
if j >= len(ret):
if val == 0:
break
ret.append([i+1]*val)
else:
ret[j].extend([i+1]*(val-len(ret[j])))
S = SemistandardTableaux()
return S(ret)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MyGTP():
def __iter__(self):
for la in Partitions(x[1], max_length=x[0]):
top_row = la + [0]*(x[0]-len(la))
for P in GelfandTsetlinPatterns(n=x[0], top_row=top_row):
yield P
def cardinality(self):
return SemistandardTableaux(size=x[1], max_entry=x[0]).cardinality()
return MyGTP()
element_repr = repr
levels = [(2, 1), (2, 2), (3, 1), (2, 3), (3, 2), (4, 1), (2, 4), (3, 3), (4, 2), (5, 1), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return Permutation(elt.standardization().to_word())
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return Partition([len(row) for row in elt])
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(T):
m = max(T.entries())
C = crystals.Tableaux(["A", m-1], shape=T.shape())
x = C(rows=T)
S = x.subcrystal(direction="upper")
return Poset(S.digraph().canonical_label().copy(immutable=True))
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
from sage.combinat.gelfand_tsetlin_patterns import GelfandTsetlinPatterns
return GelfandTsetlinPatterns()(elt)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return elt.catabolism()
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(x):
class MySemistandardTableaux():
def __iter__(self):
for T in SemistandardTableaux(size=x[0], max_entry=x[1]):
if max(T.entries()) == x[1]:
yield T
def cardinality(self):
c1 = SemistandardTableaux(size=x[0], max_entry=x[1]).cardinality()
if x[1] <= 1:
return c1
c2 = SemistandardTableaux(size=x[0], max_entry=x[1]-1).cardinality()
return c1 - c2
return MySemistandardTableaux()
element_repr = repr
levels = [(2, 2), (2, 3), (3, 2), (2, 4), (3, 3), (4, 2), (2, 5), (3, 4), (4, 3), (5, 2), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2)]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(G):
return Partition(sorted((len(c) for c in G.cliques_maximal()), reverse=True))
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(G):
if G.num_verts() > 30:
raise ValueError("Graph too big for this map")
s = G.spectrum(laplacian=True)
c = []
i, o = 0, None
for v in s:
if v != o:
c.append(i)
i, o = 0, v
i += 1
c.append(i)
return Composition(c[1:])
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(G):
G = G.relabel(inplace=False)
V = set(tuple(sorted(G[v])) for v in G.vertices())
return Poset([V, lambda a, b: set(b).issubset(a)])
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(G):
return G.complement()
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
from sage.matroids.advanced import GraphicMatroid
def mapping(G):
M = GraphicMatroid(G)
L = M.lattice_of_flats()
return L
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyGraphs():
def __iter__(self):
for G in graphs(n):
G._immutable = True
yield G
def cardinality(self):
l = [1, 1, 2, 4, 11, 34, 156, 1044, 12346, 274668]
if n < len(l):
return l[n]
else:
return Infinity
return MyGraphs()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
word = []
for child in elt:
word.append(1)
word.extend(child.to_dyck_word())
word.append(0)
from sage.combinat.dyck_word import DyckWord
return DyckWord(word)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
return elt.to_binary_tree_left_branch()
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
return elt.to_poset(root_to_leaf=False)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return elt.to_undirected_graph()
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(elt):
children = [c.left_right_symmetry() for c in elt]
children.reverse()
return OrderedTree(children)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedTrees
element_repr = repr
levels = [2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(ct):
return ct.root_system().root_poset()
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
cartan_types = [ ['A',n] ]
if n >= 2:
cartan_types += [ ['B',n] ]
if n >= 3:
cartan_types += [ ['C',n] ]
if n >= 4:
cartan_types += [ ['D',n] ]
if n in [6,7,8]:
cartan_types += [ ['E',n] ]
if n == 4:
cartan_types += [ ['F',n] ]
if n == 2:
cartan_types += [ ['G',n] ]
return [ CartanType(cartan_type) for cartan_type in cartan_types ]
element_repr = repr
levels = [1, 2, 3, 4, 5, 6, 7, 8]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return elt.cars_permutation()
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(elt):
return DyckWord(area_sequence=elt.to_area_sequence())
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(p):
return Composition(p)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(p):
return RSK(list(p))[0]
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def pollak_riordan_to_pruefer(p):
n = len(p)
return [(p[i+1] - p[i]) % (n+1) for i in range(n-1)]
def pruefer_to_tree(c):
c = list(c)
n = len(c)
V = list(range(n+2))
G = Graph([V, []])
for _ in range(n):
i, u = next((i, u) for i, u in enumerate(V) if u not in c)
del V[i]
v = c.pop(0)
G.add_edge(u, v)
G.add_edge(V)
return to_tree(G, 0)
def to_tree(G, r):
if not G:
return LabelledRootedTree([], r)
roots = G[r]
G.delete_vertex(r)
return LabelledRootedTree([to_tree(G.subgraph(G.connected_component_containing_vertex(u)), u)
for u in roots], r)
def mapping(p):
return OrderedTree(pruefer_to_tree(pollak_riordan_to_pruefer(p)))
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(p):
return ParkingFunction(p[::-1])
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(p):
w = p.to_labelled_dyck_word()
pi = []
b = []
for e in w:
if e:
b.append(e)
elif b:
pi.append(b)
b = []
return OrderedSetPartition(pi)
# DON'T edit this
parent_initializer = ParkingFunctions
element_repr = repr
levels = [1, 2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(w):
return Composition(w.delta())
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(w):
return Poset([w.factor_set(), lambda u, v: u.is_factor(v)])
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(w):
return w.BWT()
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = lambda x: Words([0,1], x)
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str(X)
levels = [1, 2, 3, 4, 5, 6]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(p):
return Partition(sum(row) for row in p)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(pp):
return PlanePartition([Partition(la) for la in pp.transpose()])
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyPlanePartitions():
def __iter__(self):
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
def cardinality(self):
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
if n < len(card):
return card[n]
else:
return Infinity
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
emp = [[]]
if n == 0:
yield [emp]
return
if outer == emp:
yield []
return
if outer is None:
outer = [n]*n
for k in range(1,n+1):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
Pp = [L] + Pp
yield Pp
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(x):
return x.permutation()
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = repr
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = repr
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = repr
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = repr
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = repr
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = repr
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = repr
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = repr
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = repr
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = repr
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = repr
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = repr
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyDecoratedPermutations():
def __iter__(self):
for tau in DecoratedPermutations(n):
yield tau
def cardinality(self):
return sum( factorial(n)/factorial(k) for k in range(n+1) )
return MyDecoratedPermutations()
def DecoratedPermutations(n):
for sigma in Permutations(n):
F = sigma.fixed_points()
for X in Subsets(F):
tau = list(sigma)
for i in X:
tau[i-1] = -tau[i-1]
yield SignedPermutations(n)(tau)
element_repr = repr
element_repr_codomain = element_repr
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(tau):
return tau.permutation()
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def to_cycles(tau):
"""Each cycle records the images of the absolute value of the
previous element.
"""
tau = list(tau)
n = len(tau)
groundset = set(range(1, n+1))
cycles = []
while groundset:
i = groundset.pop()
tau_i = tau[abs(i)-1]
abs_tau_i = abs(tau_i)
cycle = [tau_i]
while i != abs_tau_i:
groundset.remove(abs_tau_i)
tau_i = tau[abs_tau_i-1]
abs_tau_i = abs(tau_i)
cycle.append(tau_i)
cycles.append(cycle)
return cycles
def cycle_type(tau):
la = []
mu = []
for cycle in to_cycles(tau):
if prod(sign(i) for i in cycle) == 1:
la.append(len(cycle))
else:
mu.append(len(cycle))
return (Partition(sorted(la, reverse=True)), Partition(sorted(mu, reverse=True)))
def mapping(tau):
return cycle_type(tau)[1]
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(pi):
return Words([0, 1], len(pi))([0 if e > 0 else 1 for e in pi])
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(tau):
return tau.inverse()
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MySignedPermutations():
def __iter__(self):
for tau in SignedPermutations(n):
yield tau
def cardinality(self):
return 2**n*factorial(n)
return MySignedPermutations()
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(la):
return la.outer()
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(mu):
return Composition(mu.row_lengths())
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(la):
return la.cell_poset()
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(la):
return la.conjugate()
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(la):
support = SymmetricFunctions(QQ).s()(la).support()
return LatticePoset((support, lambda mu, nu: mu.dominates(nu)))
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = SkewPartitions
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda P: str(list(P)).replace(" ","")
levels = [2, 3, 4, 5]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(L):
return L
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(L):
return L.dual()
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
else:
return Infinity
return MyLattices()
element_repr = repr
element_repr_codomain = element_repr
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(pi):
return Permutation([e for b in pi for e in sorted(b)])
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(pi):
return Composition([len(b) for b in pi])
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(pi):
return SetPartition(pi)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = lambda X: str(sorted([sorted(s) for s in X])).replace("[","{").replace("]","}")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = lambda m: str(sorted(tuple(sorted(b)) for b in m))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = lambda X: "( "+X._repr_()+", "+str(X.k())+" )"
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = lambda X: str([list(row) for row in X.to_matrix()])
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = lambda X: str((sorted(X.canonical_label().edges(sort=False, labels=False)), X.num_verts()))
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = lambda X: str(X)
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
def element_repr(pi):
pi = list(pi)
for i,a in enumerate(pi):
if a == i+1:
pi[i] = 0
elif -a == i+1:
pi[i] = -1
return str(pi).replace(" ","").replace("0","+").replace("-1","-")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = lambda P: str(list(P)).replace(" ","")
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(element):
return new_map(element)
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
element_repr_codomain = element_repr
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr_codomain(mapping(elt))))
# edit this
def mapping(pi):
return pi.reversed()
# DON'T edit this
parent_initializer = OrderedSetPartitions
element_repr = repr
levels = [2, 3, 4]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), element_repr(mapping(elt))))