Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

r""" 

Virtual Crystals 

 

These are the crystals that are subsets of a larger ambient crystal with 

virtual crystal operators. 

 

AUTHORS: 

 

- Travis Scrimshaw (2013-10-16): Initial implementation 

""" 

 

#***************************************************************************** 

# Copyright (C) 2013 Travis Scrimshaw <tscrim at ucdavis.edu> 

# 

# Distributed under the terms of the GNU General Public License (GPL) 

# 

# This code is distributed in the hope that it will be useful, 

# but WITHOUT ANY WARRANTY; without even the implied warranty of 

# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 

# General Public License for more details. 

# 

# The full text of the GPL is available at: 

# 

# http://www.gnu.org/licenses/ 

#**************************************************************************** 

 

from __future__ import division 

 

from sage.categories.crystals import Crystals 

from sage.categories.finite_crystals import FiniteCrystals 

from sage.combinat.root_system.cartan_type import CartanType 

from sage.combinat.crystals.subcrystal import Subcrystal 

from sage.sets.family import Family 

 

class VirtualCrystal(Subcrystal): 

r""" 

A virtual crystal `V` of an ambient crystal `\widehat{B}` is a crystal 

formed by taking a subset of `\widehat{B}` and whose crystal structure 

is given by 

 

.. MATH:: 

 

e_i = \prod_{j \in \sigma_i} \widehat{e}_j^{\gamma_i}, \quad 

f_i = \prod_{j \in \sigma_i} \widehat{f}_j^{\gamma_i}, 

 

.. MATH:: 

 

\varepsilon_i = \frac{\widehat{\varepsilon}_j}{\gamma_j}, \quad 

\varphi_i = \frac{\widehat{\varphi}_j}{\gamma_j}, \quad 

\operatorname{wt} = \Psi^{-1} \circ \widehat{\operatorname{wt}} 

 

where `\sigma_i` is a subset of the index set of `B`, `\gamma_i \in \ZZ` 

are the *scaling factors*, and `\Psi : P \to \widehat{P}` is an embedding 

of the weight lattices. We note that for the crystal to be well-defined, 

we must have 

 

.. MATH:: 

 

\widehat{\varepsilon}_j = \widehat{\varepsilon|j^{\prime}}, 

\quad \widehat{\varphi}_j = \widehat{\varphi}_{j^{\prime}} 

 

for all `j, j^{\prime} \in \sigma_i` and that the order that the Kashiwara 

operators in the ambient space are applied does not affect the result. 

 

INPUT: 

 

- ``ambient`` -- the ambient crystal 

- ``virtualization`` -- a dictionary whose key `i` corresponds 

to the set `\sigma_i` 

- ``scaling_factors`` -- a dictionary whose key `i` corresponds to 

the scaling factor `\gamma_i` 

- ``contained`` -- (optional) a set (or function) which specifies when an 

element is contained in the subcrystal; the default is everything 

possible is included 

- ``generators`` -- (optional) the generators for the virtual crystal; the 

default is the generators for the ambient crystal 

- ``cartan_type`` -- (optional) the Cartan type for the virtual crystal; 

the default is the Cartan type for the ambient crystal 

- ``index_set`` -- (optional) the index set for the virtual crystal; the 

default is the index set for the Cartan type 

- ``category`` -- (optional) the category for the virtual crystal; the 

default is the :class:`~sage.categories.crystals.Crystals` category 

 

EXAMPLES: 

 

We construct an example from a natural virtualization map of type `C_n` 

in type `A_{2n-1}`:: 

 

sage: C = crystals.Tableaux(['C',2], shape=[1]) 

sage: A = crystals.Tableaux(['A',3], shape=[2,1,1]) 

sage: psi = C.crystal_morphism(A.module_generators) 

sage: V = psi.image() 

sage: list(V) 

[[[1, 1], [2], [3]], 

[[1, 2], [2], [4]], 

[[1, 3], [3], [4]], 

[[2, 4], [3], [4]]] 

sage: V.digraph().is_isomorphic(C.digraph(), edge_labels=True) 

True 

 

We construct the virtualization of a `U_q'(\mathfrak{g})`-crystal 

`B^{r,s}` of type `C_n^{(1)}` in type `A_{2n+1}^{(2)}`. Here it is not 

a default folding known to Sage, so we have to explicitly state the 

folding (since the scaling factors are not specified, they are all 

assumed to be 1):: 

 

sage: K = crystals.KirillovReshetikhin(['C',2,1], 1,1) 

sage: VK = crystals.KirillovReshetikhin(['A',5,2], 1,1) 

sage: target = VK.module_generator().f(1); target 

[[2]] 

sage: psi = K.crystal_morphism({K.module_generator(): target}, 

....: virtualization={0:[0,1], 1:[2], 2:[3]}) 

sage: V = psi.image() 

sage: list(V) 

[[[2]], [[3]], [[-2]], [[-3]]] 

sage: V.digraph().is_isomorphic(K.digraph(), edge_labels=True) 

True 

 

We create an example of `B(\Lambda_n)` of type `B_n` inside 

of `B(2\Lambda_n)` using the doubling map through the (virtual) 

subcrystal method:: 

 

sage: BB = crystals.Tableaux(['B',3], shape=[1,1,1]) 

sage: S = BB.subcrystal(scaling_factors={1:2, 2:2, 3:2}) 

sage: B = crystals.Tableaux(['B',3], shape=[1/2,1/2,1/2]) 

sage: S.digraph().is_isomorphic(B.digraph(), edge_labels=True) 

True 

 

We can also directly construct a virtual crystal using 

:class:`VirtualCrystal` (however it is recommended to use either 

:meth:`~sage.categories.crystals.Crystals.ParentMethods.crystal_morphism` 

or :meth:`~sage.categories.crystals.Crystals.ParentMethods.subcrystal`):: 

 

sage: from sage.combinat.crystals.virtual_crystal import VirtualCrystal 

sage: A = crystals.Tableaux(['A',3], shape=[2,1,1]) 

sage: V = VirtualCrystal(A, {1:(1,3), 2:(2,)}, {1:1, 2:2}, cartan_type=['C',2]) 

sage: G = crystals.Tableaux(['C',2], shape=[1]).digraph() 

sage: V.digraph().is_isomorphic(G, edge_labels=True) 

True 

 

sage: C1 = crystals.Tableaux(['A',3], shape=[1]) 

sage: C2 = crystals.Tableaux(['A',3], shape=[1,1,1]) 

sage: T = C1.tensor(C2) 

sage: mg = T(C1.module_generators[0], C2.module_generators[0]) 

sage: V = VirtualCrystal(A, {1:(1,3), 2:(2,)}, {1:1, 2:2}, 

....: cartan_type=['C',2], generators=[mg]) 

sage: V.digraph().is_isomorphic(G, edge_labels=True) 

True 

 

REFERENCES: 

 

- [FOS09]_ 

- [OSS03]_ 

- [OSS2003]_ 

""" 

@staticmethod 

def __classcall_private__(cls, ambient, virtualization, scaling_factors, 

contained=None, generators=None, 

cartan_type=None, index_set=None, category=None): 

""" 

Normalize arguments to ensure a unique representation. 

 

EXAMPLES:: 

 

sage: B = crystals.Tableaux(['B',3], shape=[1]) 

sage: C = crystals.Tableaux(['D',4], shape=[2]) 

sage: psi1 = B.crystal_morphism(C.module_generators) 

sage: V1 = psi1.image() 

sage: psi2 = B.crystal_morphism(C.module_generators, index_set=[1,2,3]) 

sage: V2 = psi2.image() 

sage: V1 is V2 

True 

 

TESTS: 

 

Check that :trac:`19481` is fixed:: 

 

sage: from sage.combinat.crystals.virtual_crystal import VirtualCrystal 

sage: A = crystals.Tableaux(['A',3], shape=[2,1,1]) 

sage: V = VirtualCrystal(A, {1:(1,3), 2:(2,)}, {1:1, 2:2}, cartan_type=['C',2]) 

sage: V.category() 

Category of finite crystals 

""" 

if cartan_type is None: 

cartan_type = ambient.cartan_type() 

else: 

cartan_type = CartanType(cartan_type) 

if index_set is None: 

index_set = cartan_type.index_set() 

if generators is None: 

generators = ambient.module_generators 

virtualization = Family(virtualization) 

scaling_factors = Family(scaling_factors) 

 

category = Crystals().or_subcategory(category) 

if ambient in FiniteCrystals() or isinstance(contained, frozenset): 

category = category.Finite() 

 

return super(Subcrystal, cls).__classcall__(cls, ambient, virtualization, scaling_factors, 

contained, tuple(generators), cartan_type, 

tuple(index_set), category) 

 

def __init__(self, ambient, virtualization, scaling_factors, 

contained, generators, cartan_type, index_set, category): 

""" 

Initialize ``self``. 

 

EXAMPLES:: 

 

sage: B = crystals.Tableaux(['B',3], shape=[1]) 

sage: C = crystals.Tableaux(['D',4], shape=[2]) 

sage: psi = B.crystal_morphism(C.module_generators) 

sage: V = psi.image() 

sage: TestSuite(V).run() 

""" 

self._virtualization = virtualization 

self._scaling_factors = scaling_factors 

Subcrystal.__init__(self, ambient, contained, generators, 

cartan_type, index_set, category) 

 

def _repr_(self): 

""" 

Return a string representation of ``self``. 

 

EXAMPLES:: 

 

sage: B = crystals.Tableaux(['B',3], shape=[1]) 

sage: C = crystals.Tableaux(['D',4], shape=[2]) 

sage: psi = B.crystal_morphism(C.module_generators) 

sage: psi.image() 

Virtual crystal of The crystal of tableaux of type ['D', 4] and shape(s) [[2]] of type ['B', 3] 

""" 

return "Virtual crystal of {} of type {}".format(self._ambient, self._cartan_type) 

 

def __contains__(self, x): 

""" 

Check if ``x`` is in ``self``. 

 

EXAMPLES:: 

 

sage: B = crystals.Tableaux(['B',3], shape=[1]) 

sage: C = crystals.Tableaux(['D',4], shape=[2]) 

sage: psi = B.crystal_morphism(C.module_generators) 

sage: V = psi.image() 

sage: mg = C.module_generators[0] 

sage: mg in V 

True 

sage: mg.f(1) in V 

False 

sage: mg.f(1).f(1) in V 

True 

""" 

if not Subcrystal.__contains__(self, x): 

return False 

if self in FiniteCrystals(): 

if isinstance(x, self._ambient.element_class): 

if x.parent() == self: 

x = self.element_class(self, self._ambient(x)) 

elif x.parent() == self._ambient: 

x = self.element_class(self, self._ambient(x)) 

elif isinstance(x, self.element_class) and x.parent() != self: 

x = self.element_class(self, x.value) 

return x in self.list() 

return True 

 

def virtualization(self): 

""" 

Return the virtualization sets `\sigma_i`. 

 

EXAMPLES:: 

 

sage: B = crystals.Tableaux(['B',3], shape=[1]) 

sage: C = crystals.Tableaux(['D',4], shape=[2]) 

sage: psi = B.crystal_morphism(C.module_generators) 

sage: V = psi.image() 

sage: V.virtualization() 

Finite family {1: (1,), 2: (2,), 3: (3, 4)} 

""" 

return self._virtualization 

 

def scaling_factors(self): 

""" 

Return the scaling factors `\gamma_i`. 

 

EXAMPLES:: 

 

sage: B = crystals.Tableaux(['B',3], shape=[1]) 

sage: C = crystals.Tableaux(['D',4], shape=[2]) 

sage: psi = B.crystal_morphism(C.module_generators) 

sage: V = psi.image() 

sage: V.scaling_factors() 

Finite family {1: 2, 2: 2, 3: 1} 

""" 

return self._scaling_factors 

 

class Element(Subcrystal.Element): 

""" 

An element of a virtual (sub)crystal. Wraps an element in the 

ambient crystal. 

""" 

def e(self, i): 

""" 

Return `e_i` of ``self``. 

 

EXAMPLES:: 

 

sage: B = crystals.Tableaux(['B',3], shape=[1]) 

sage: C = crystals.Tableaux(['D',4], shape=[2]) 

sage: psi = B.crystal_morphism(C.module_generators) 

sage: V = psi.image() 

sage: mg = V.module_generators[0] 

sage: mg.e(1) 

sage: b = psi(B.module_generators[0].f(1)) 

sage: V(b).e(1) 

[[1, 1]] 

""" 

s = [] 

P = self.parent() 

sf = P._scaling_factors[i] 

for j in P._virtualization[i]: 

s += [j]*sf 

ret = self.value.e_string(s) 

if ret is None: 

return None 

return self.__class__(P, ret) 

 

def f(self, i): 

""" 

Return `f_i` of ``self``. 

 

EXAMPLES:: 

 

sage: B = crystals.Tableaux(['B',3], shape=[1]) 

sage: C = crystals.Tableaux(['D',4], shape=[2]) 

sage: psi = B.crystal_morphism(C.module_generators) 

sage: V = psi.image() 

sage: mg = V.module_generators[0] 

sage: mg.f(1) 

[[2, 2]] 

sage: mg.f(2) 

""" 

s = [] 

P = self.parent() 

sf = P._scaling_factors[i] 

for j in P._virtualization[i]: 

s += [j]*sf 

ret = self.value.f_string(s) 

if ret is None: 

return None 

return self.__class__(P, ret) 

 

def epsilon(self, i): 

r""" 

Return `\varepsilon_i` of ``self``. 

 

EXAMPLES:: 

 

sage: B = crystals.Tableaux(['B',3], shape=[1]) 

sage: C = crystals.Tableaux(['D',4], shape=[2]) 

sage: psi = B.crystal_morphism(C.module_generators) 

sage: V = psi.image() 

sage: mg = V.module_generators[0] 

sage: mg.epsilon(2) 

0 

sage: mg.f(1).epsilon(1) 

1 

""" 

P = self.parent() 

return self.value.epsilon(P._virtualization[i][0]) // P._scaling_factors[i] 

 

def phi(self, i): 

r""" 

Return `\varphi_i` of ``self``. 

 

EXAMPLES:: 

 

sage: B = crystals.Tableaux(['B',3], shape=[1]) 

sage: C = crystals.Tableaux(['D',4], shape=[2]) 

sage: psi = B.crystal_morphism(C.module_generators) 

sage: V = psi.image() 

sage: mg = V.module_generators[0] 

sage: mg.phi(1) 

1 

sage: mg.phi(2) 

0 

""" 

P = self.parent() 

return self.value.phi(P._virtualization[i][0]) // P._scaling_factors[i] 

 

def weight(self): 

""" 

Return the weight of ``self``. 

 

EXAMPLES:: 

 

sage: B = crystals.Tableaux(['B',3], shape=[1]) 

sage: C = crystals.Tableaux(['D',4], shape=[2]) 

sage: psi = B.crystal_morphism(C.module_generators) 

sage: V = psi.image() 

sage: mg = V.module_generators[0] 

sage: mg.weight() 

(1, 0, 0) 

sage: mg.f(1).weight() 

(0, 1, 0) 

sage: all(V(psi(x)).weight() == x.weight() for x in B) 

True 

""" 

P = self.parent() 

WLR = P.weight_lattice_realization() 

wt = self.value.weight() 

ac = P._ambient.weight_lattice_realization().simple_coroots() 

La = WLR.fundamental_weights() 

v = P._virtualization 

sf = P._scaling_factors 

return WLR.sum(wt.scalar(ac[v[i][0]]) // sf[i] * La[i] 

for i in self.index_set()) 

 

# TODO: implement a devirtualization map