@@ -11,8 +11,8 @@ Nikolaus Conference 2010, Aachen: Sage-Combinat demo
11
11
12
12
::
13
13
14
- sage: %hide
15
- sage: pretty_print_default(False)
14
+ sage: %hide # not tested
15
+ sage: pretty_print_default(False) # not tested
16
16
17
17
18
18
Tableaux and the like
@@ -22,6 +22,7 @@ Tableaux and the like
22
22
23
23
sage: s = Permutation([5,3,2,6,4,8,9,7,1])
24
24
sage: s
25
+ [5, 3, 2, 6, 4, 8, 9, 7, 1]
25
26
26
27
sage: (p,q) = s.robinson_schensted()
27
28
sage: p.pp()
@@ -39,6 +40,7 @@ Counting & the like
39
40
::
40
41
41
42
sage: Partitions(100000).cardinality()
43
+ 27493510569...
42
44
43
45
Species::
44
46
@@ -65,11 +67,12 @@ Lattice points of polytopes
65
67
66
68
::
67
69
68
- sage: A= random_matrix(ZZ,3,6 ,x=7)
69
- sage: L= LatticePolytope(A)
70
+ sage: A = random_matrix(ZZ,6,3 ,x=7)
71
+ sage: L = LatticePolytope(A)
70
72
sage: L.plot3d()
73
+ Graphics3d Object
71
74
72
- sage: L.npoints() # should be cardinality!
75
+ sage: L.npoints() # should be cardinality! # random
73
76
28
74
77
75
78
This example used PALP and J-mol
@@ -80,7 +83,8 @@ Graphs up to an isomorphism
80
83
::
81
84
82
85
sage: show(graphs(5, lambda G: G.size() <= 4))
83
-
86
+ <html>...
87
+
84
88
Symmetric functions
85
89
+++++++++++++++++++
86
90
@@ -89,69 +93,76 @@ Usual bases::
89
93
sage: Sym = SymmetricFunctions(QQ); Sym
90
94
Symmetric Functions over Rational Field
91
95
sage: Sym.inject_shorthands()
92
-
96
+ Defining ...
97
+
93
98
sage: m(( ( h[2,1] * ( 1 + 3 * p[2,1]) ) + s[2](s[3])))
99
+ 3*m[1, 1, 1] + ...
94
100
95
101
Macdonald polynomials::
96
102
97
- sage: J = MacdonaldPolynomialsJ(QQ)
98
- sage: P = MacdonaldPolynomialsP(QQ)
99
- sage: Q = MacdonaldPolynomialsQ(QQ)
103
+ sage: Sym = SymmetricFunctions(FractionField(QQ['q','t']))
104
+ sage: J = Sym.macdonald().J()
105
+ sage: P = Sym.macdonald().P()
106
+ sage: Q = Sym.macdonald().Q()
100
107
sage: J
101
- Macdonald polynomials in the J basis over Fraction Field of Multivariate Polynomial Ring in q, t over Rational Field
108
+ Symmetric Functions over Fraction Field of Multivariate Polynomial Ring in q, t over Rational Field in the Macdonald J basis
109
+
102
110
sage: P(J[2,2] + 3 * Q[3,1])
111
+ (...)*McdP[2, 2] + ...
103
112
104
113
Root systems
105
114
++++++++++++
106
115
107
116
::
108
117
109
118
sage: L = RootSystem(['A',2,1]).weight_space()
110
- sage: L.plot(size=[[-1..1],[-1..1]],alcovewalks=[[0,2,0,1,2,1,2,0,2,1]])
119
+ sage: L.plot(alcove_walk=[0,2,0,1,2,1,2,0,2,1])
120
+ Graphics object consisting of 148 graphics primitives
111
121
112
122
sage: W = WeylGroup(["B", 3])
113
123
sage: W.cayley_graph(side = "left").plot3d(color_by_label = True)
114
-
124
+ Graphics3d Object
125
+
115
126
GAP at work
116
127
+++++++++++
117
128
118
129
::
119
130
131
+ sage: W = WeylGroup(["B", 3])
120
132
sage: print(W.character_table()) # Thanks GAP!
121
133
CT1
122
-
123
- 2 4 4 3 3 4 3 1 1 3 4
124
- 3 1 . . . . . 1 1 . 1
125
-
126
- 1a 2a 2b 4a 2c 2d 6a 3a 4b 2e
127
-
134
+ ...
128
135
X.1 1 1 1 1 1 1 1 1 1 1
129
136
X.2 1 1 1 -1 -1 -1 -1 1 1 -1
130
137
X.3 1 1 -1 -1 1 -1 1 1 -1 1
131
138
X.4 1 1 -1 1 -1 1 -1 1 -1 -1
132
139
X.5 2 2 . . -2 . 1 -1 . -2
133
140
X.6 2 2 . . 2 . -1 -1 . 2
134
- X.7 3 -1 1 1 1 -1 . . -1 - 3
135
- X.8 3 -1 -1 - 1 1 1 . . 1 -3
136
- X.9 3 -1 -1 1 -1 -1 . . 1 3
137
- X.10 3 -1 1 -1 - 1 1 . . -1 3
141
+ X.7 3 -1 - 1 1 - 1 -1 . . 1 3
142
+ X.8 3 -1 1 1 1 -1 . . - 1 -3
143
+ X.9 3 -1 1 -1 -1 1 . . - 1 3
144
+ X.10 3 -1 - 1 -1 1 1 . . 1 - 3
138
145
139
146
sage: type(W.character_table())
147
+ <class 'sage.interfaces.interface.AsciiArtString'>
140
148
141
- sage: G = gap(W); G
149
+ sage: G = W.gap(); G
150
+ <matrix group of size 48 with 3 generators>
142
151
143
- sage: G.Ch
152
+ sage: G.Ch # not tested
144
153
145
154
sage: T = G.CharacterTable(); T
155
+ CharacterTable( <matrix group of size 48 with 3 generators> )
146
156
147
- sage: T.Irr()[10,10]
157
+ sage: T.Irr()[4,4]
158
+ -2
148
159
149
160
Coxeter3 at work
150
161
++++++++++++++++
151
162
152
163
::
153
164
154
- sage: W3 = CoxeterGroup(W , implementation="coxeter3")
165
+ sage: W3 = CoxeterGroup(["B", 3] , implementation="coxeter3")
155
166
sage: KL = matrix([ [ W3.kazhdan_lusztig_polynomial(u,v) if u.bruhat_le(v) else 0 for u in W3 ]
156
167
....: for v in W3])
157
168
sage: show(KL)
@@ -170,10 +181,9 @@ Crystals
170
181
171
182
::
172
183
173
- sage: latex.jsmath_avoid_list(['tikzpicture'])
174
- sage: K = KirillovReshetikhinCrystal(['A',3,1], 2,2)
184
+ sage: K = crystals.KirillovReshetikhin(['A',3,1], 2,2)
175
185
sage: G = K.digraph()
176
- sage: G.set_latex_options(format = "dot2tex", edge_labels = True, color_by_label = {0:"black", 1:"blue", 2:"red", 3:"green"}, edge_options = lambda (u,v,label) :({"backward":label == 0}))
186
+ sage: G.set_latex_options(format = "dot2tex", edge_labels = True, color_by_label = {0:"black", 1:"blue", 2:"red", 3:"green"}, edge_options= lambda u_v_label :({"backward": u_v_label[2] == 0}))
177
187
sage: view(G, viewer="pdf", tightpage=True)
178
188
179
189
* :ref: `demo-GAP3-Semigroupe `
0 commit comments