atlas  0.6
blocks.h
Go to the documentation of this file.
1 /*
2  This is blocks.h
3 
4  Copyright (C) 2004,2005 Fokko du Cloux
5  Copyright (C) 2007-2016 Marc van Leeuwen
6  part of the Atlas of Lie Groups and Representations
7 
8  For license information see the LICENSE file
9 */
10 
11 // Class definition and function declarations for class |Block| and friends.
12 
13 #ifndef BLOCKS_H /* guard against multiple inclusions */
14 #define BLOCKS_H
15 
16 #include <cassert>
17 #include <iostream>
18 
19 #include "ratvec.h" // containment infinitesimal character
20 
21 #include "../Atlas.h"
22 #include "tits.h" // representative of $y$ in |non_integral_block|
23 #include "descents.h" // inline methods
24 #include "dynkin.h" // DynkinDiagram
25 
26 namespace atlas {
27 
28 namespace blocks {
29 
30 
31 /******** function declarations *********************************************/
32 
33  // compute the involution in |dual_W| corresponding to |w| in |W|
35  (const TwistedInvolution& w,
36  const TwistedWeylGroup& W,
37  const TwistedWeylGroup& dual_W);
38 
39  // map from numbering of |b| to that of |dual_b|, assuming latter is dual
40  std::vector<BlockElt> dual_map(const Block_base& b, const Block_base& dual_b);
41 
42  BitMap common_Cartans(RealReductiveGroup& GR, RealReductiveGroup& dGR);
43 
44  struct ext_gen; // defined below, represents fold-orbit of Weyl generators
45  DynkinDiagram folded // produced folded version of diagram, given orbits
46  (const DynkinDiagram& diag, const std::vector<ext_gen>& orbits);
47 
48 
49 /******** type definitions **************************************************/
50 
51 struct ext_gen // generator of extended Weyl group
52 {
53  enum { one, two, three } type;
55  WeylWord w_tau;
56 
57  explicit ext_gen (weyl::Generator s)
58  : type(one), s0(s), s1(~0), w_tau() { w_tau.push_back(s); }
60  : type(commute ? two : three), s0(s), s1(t)
61  { w_tau.push_back(s); w_tau.push_back(t);
62  if (not commute) w_tau.push_back(s);
63  }
64 
65  int length() const { return type+1; }
66 };
67 
68 // The class |BlockBase| serves external functionality, not block construction
70 {
71  public: // we need this typedef to be public, though used in derived classes
72  struct EltInfo // per block element information
73  {
74  KGBElt x,y; // indices into |KGB| sets (which might no longer exist)
75  DescentStatus descent;
76  unsigned short length;
77  BlockElt dual; // number of Hermitian dual of this element, if any
78  EltInfo(KGBElt xx,KGBElt yy,DescentStatus dd, unsigned short ll)
79  : x(xx),y(yy),descent(dd),length(ll), dual(UndefBlock) {}
80  EltInfo(KGBElt xx,KGBElt yy, unsigned short ll)
81  : x(xx),y(yy),descent(),length(ll), dual(UndefBlock) {}
82 
83  // methods that will allow building a hashtable with |info| as pool
84  typedef std::vector<EltInfo> Pooltype;
85  size_t hashCode(size_t modulus) const { return (13*x+21*y)&(modulus-1); }
86  bool operator != (const EltInfo& o) const
87  { return x!=o.x or y!=o.y; }
88 
89  }; // |struct EltInfo|
90 
91  protected: // all fields may be set in a derived class contructor
92  struct block_fields // per block element and simple reflection data
93  {
97  : cross_image(UndefBlock), Cayley_image(UndefBlock,UndefBlock) {}
98  };
99 
100  std::vector<EltInfo> info; // its size defines the size of the block
101  std::vector<std::vector<block_fields> > data; // size |d_rank| * |size()|
102  std::vector<ext_gen> orbits;
103 
104  // map KGB element |x| to the first block element |z| with |this->x(z)>=x|
105  // this vector may remain empty if |element| virtual methodis redefined
106  std::vector<BlockElt> d_first_z_of_x; // of size |xsize+1|
107 
108  DynkinDiagram dd;
109  // possible tables of Bruhat order and Kazhdan-Lusztig polynomials
110  BruhatOrder* d_bruhat;
112 
113  public:
114 
115 // constructors and destructors
116  Block_base(const KGB& kgb,const KGB& dual_kgb);
117  Block_base(unsigned int rank); // only dimensions some vectors
118 
119  virtual ~Block_base(); // deletes |d_bruhat| and |klc_ptr| (if non-NULL)
120 
121 // copy, assignment and swap
122 
123  Block_base(const Block_base& b); // implemented but never used (optimized out)
124  private:
125  Block_base& operator=(const Block_base& b); // not implemented
126  public:
127 
128 // accessors
129 
130  size_t rank() const { return data.size(); } // semisimple rank matters
131  size_t folded_rank() const { return orbits.size(); }
132  size_t size() const { return info.size(); }
133 
134  virtual KGBElt xsize() const = 0;
135  virtual KGBElt ysize() const = 0;
136 
137  const DynkinDiagram& Dynkin() const { return dd; }
138  ext_gen orbit(weyl::Generator s) const { return orbits[s]; }
139  const std::vector<ext_gen>& fold_orbits() const { return orbits; }
140 
141  KGBElt x(BlockElt z) const { assert(z<size()); return info[z].x; }
142  KGBElt y(BlockElt z) const { assert(z<size()); return info[z].y; }
143 
144  // Look up element by |x|, |y| coordinates
145  virtual BlockElt element(KGBElt x,KGBElt y) const;
146 
147  size_t length(BlockElt z) const { return info[z].length; }
148 
149  BlockElt length_first(size_t l) const; // first element of given length
150 
152  { assert(z<size()); assert(s<rank()); return data[s][z].cross_image; }
153 
155  { assert(z<size()); assert(s<rank());
156  if (not isWeakDescent(s,z))
157  return data[s][z].Cayley_image;
158  else return BlockEltPair(UndefBlock,UndefBlock);
159  }
160 
162  { assert(z<size()); assert(s<rank());
163  if (isWeakDescent(s,z))
164  return data[s][z].Cayley_image;
165  else return BlockEltPair(UndefBlock,UndefBlock);
166  }
167 
168  const DescentStatus& descent(BlockElt z) const
169  { assert(z<size()); return info[z].descent; }
170  DescentStatus::Value descentValue(weyl::Generator s, BlockElt z) const
171  { assert(z<size()); assert(s<rank()); return descent(z)[s]; }
172 
174  { return DescentStatus::isDescent(descentValue(s,z)); }
175 
176  bool isStrictAscent(weyl::Generator, BlockElt) const;
177  bool isStrictDescent(weyl::Generator, BlockElt) const;
178  weyl::Generator firstStrictDescent(BlockElt z) const;
179  weyl::Generator firstStrictGoodDescent(BlockElt z) const;
180 
181  BlockElt Hermitian_dual(BlockElt z) const { return info[z].dual; }
182 
183  // The functor $T_{\alpha,\beta}$; might have been a non-method function
184  BlockEltPair link
185  (weyl::Generator alpha,weyl::Generator beta,BlockElt y) const;
186 
187  virtual const TwistedInvolution& involution(BlockElt z) const =0;
188 
189  // print whole block to stream (name chosen to avoid masking by |print|)
190  std::ostream& print_to
191  (std::ostream& strm,bool as_invol_expr) const; // defined in |block_io|
192 
193  // print derivated class specific information for |z| (used in |print_to|)
194  virtual std::ostream& print
195  (std::ostream& strm, BlockElt z,bool as_invol_expr) const =0;
196 
197  // manipulators
198  BruhatOrder& bruhatOrder() { fillBruhat(); return *d_bruhat; }
200  { fill_klc(last_y,verbose); return *klc_ptr; }
201 
202  protected:
203  // a method to straighten out blocks generated in some non standard order
204  // renumber |x| through |new_x|, then order increasingly, set |first_z_of_x|
205  KGBElt renumber_x(const std::vector<KGBElt>& new_x);
206  void compute_first_zs(); // set |first_z_of_x| according to |x| values
207 
208  private:
209  void fillBruhat();
210  void fill_klc(BlockElt last_y,bool verbose);
211 
212 }; // |class Block_base|
213 
236 class Block : public Block_base
237 {
238  const TwistedWeylGroup& tW; // reference is used here only for printing
239 
240  size_t xrange;
241  size_t yrange;
242 
243  // wasteful fields, but we cannot lean on |KGB|, which might no longer exist
244  std::vector<size_t> d_Cartan; // of size |size()|
245  TwistedInvolutionList d_involution; // of size |size()|
246 
250  std::vector<RankFlags> d_involutionSupport; // of size |size()|
251 
252 
253 // constructors and destructors
254  // the main constructor is private to ensure consistency of twists of KGBs
255  Block(const KGB& kgb,const KGB& dual_kgb);
256 
257  public:
258  // use one of the following two pseudo contructors to build |Block| values
259  static Block build // pseudo contructor with small (and forgotten) KGB sets
260  (InnerClass&, RealFormNbr rf, RealFormNbr drf);
261 
262  static Block build // pseudo contructor with stored KGB sets
263  (RealReductiveGroup& G_R, RealReductiveGroup& dG_R);
264 
265  ~Block() {}
266 
267 // copy, assignment and swap
268  Block(const Block& b); // copy contructor, must be accessible, but is unused
269  private:
270  Block& operator=(const Block& b); // we don't however need to assign
271  public:
272 
273 // accessors
274 
275  const TwistedWeylGroup& twistedWeylGroup() const { return tW; }
276  const WeylGroup& weylGroup() const { return tW.weylGroup(); }
277 
278  virtual KGBElt xsize() const { return xrange; }
279  virtual KGBElt ysize() const { return yrange; }
280 
281  size_t Cartan_class(BlockElt z) const
282  { assert(z<size()); return d_Cartan[z]; }
283 
284  size_t max_Cartan() const { return Cartan_class(size()-1); } // for printing
285 
292  virtual const TwistedInvolution& involution(BlockElt z) const
293  { assert(z<size()); return d_involution[z]; }
294 
297  {
298  assert(z<size());
299  return d_involutionSupport[z];
300  }
301 
302  virtual std::ostream& print // defined in block_io.cpp
303  (std::ostream& strm, BlockElt z,bool as_invol_expr) const;
304 
305 
306  // private accessor and manipulators
307 private:
308  void compute_supports(); // used during construction
309 
310 }; // |class Block|
311 
312 typedef HashTable<y_entry,KGBElt> y_part_hash;
313 
314 // |param_block| is intermediate between |Block_base| and |non_integral_block|
315 class param_block : public Block_base // blocks of parameters
316 {
317  protected: // everything that is here serves derived classes only
318  const Rep_context& rc; // accesses many things, including KGB set for x
319 
320  RatWeight infin_char; // infinitesimal character
321  RankFlags singular; // flags simple roots for which |infin_char| is singular
322 
323  std::vector<KGBElt> kgb_nr_of; // maps child |x| numbers to parent |kgb|
324  std::vector<KGBElt> x_of; // inverse mapping, partial
325 
326  y_entry::Pooltype y_pool;
327  y_part_hash y_hash;
328 
329  param_block(const Rep_context& rc, unsigned int rank);
330 
331  // auxiliary for construction
332  void compute_duals(const InnerClass& G,const SubSystem& rs);
333 
334  public:
335  // "inherited" accessors
336  const InnerClass& innerClass() const;
337  const InvolutionTable& involution_table() const;
338  RealReductiveGroup& realGroup() const;
339 
340  const RatWeight& gamma() const { return infin_char; }
341  KGBElt parent_x(BlockElt z) const { return kgb_nr_of[x(z)]; }
342  const TorusElement& y_rep(KGBElt y) const { return y_pool[y].repr(); }
343 
344  RatWeight nu(BlockElt z) const; // "real" projection of |infin_char|
345  Weight lambda_rho(BlockElt z) const; // reconstruct from y value
346  RatWeight lambda(BlockElt z) const; // reconstruct from y value
347  RankFlags singular_simple_roots() { return singular; }
348  bool survives(BlockElt z) const; // whether $J(z_{reg})$ survives tr. functor
349  BlockEltList survivors_below(BlockElt z) const; // expression for $I(z)$
350 
351  // virtual methods
352  virtual KGBElt xsize() const { return kgb_nr_of.size(); } // child |x| range
353  virtual KGBElt ysize() const { return y_hash.size(); } // child |y| range
354  virtual const TwistedInvolution& involution(BlockElt z) const; // from |kgb|
355 
356 }; // |class param_block|
357 
358 
360 typedef HashTable<block_elt_entry,BlockElt> block_hash;
361 
363 {
364 
365  // A simple structure to pack a pair of already sequenced numbers (indices
366  // into the |info| field for some future block) into a hashable value
367 
368  block_hash z_hash; // on |Block_base::info|
369 
370  public:
371  non_integral_block // constructor for full block
372  (const repr::Rep_context& rc,
373  StandardRepr sr, // by value,since it will be made dominant before use
374  BlockElt& entry_element // set to block element matching input
375  );
376 
377  non_integral_block // alternative constructor, for interval below |sr|
378  (const repr::Rep_context& rc,
379  StandardRepr sr); // by value,since it will be made dominant before use
380 
381  // virtual methods
382  virtual BlockElt element(KGBElt x,KGBElt y) const; // redefined using |z_hash|
383  virtual std::ostream& print // defined in block_io.cpp
384  (std::ostream& strm, BlockElt z,bool as_invol_expr) const;
385 
386  // new methods
387  RatWeight y_part(BlockElt z) const; // raw torus part info, normalized
388 
389  private:
390  void add_z(KGBElt x,KGBElt y, unsigned short l);
391 
392 }; // |class non_integral_block|
393 
394 
395 class nblock_elt // internal representation during construction
396 {
397  friend class nblock_help;
398  KGBElt xx; // identifies element in parent KGB set
399  TorusElement yy; // adds "local system" information to |xx|
400 public:
401  nblock_elt (KGBElt x, const TorusElement& t) : xx(x), yy(t) {}
402 
403  KGBElt x() const { return xx; }
404  const TorusElement& y() const { return yy; }
405 
406 }; // |class nblock_elt|
407 
408 class nblock_help // a support class for |nblock_elt|
409 {
410 public: // references stored for convenience, no harm in exposing them
411  const KGB& kgb;
412  const RootDatum& rd; // the full (parent) root datum
413  const SubSystem& sub; // the relevant subsystem
414  const InvolutionTable& i_tab; // information about involutions, for |pack|
415 
416 private:
417  std::vector<TorusPart> dual_m_alpha; // the simple roots, reduced modulo 2
418  std::vector<TorusElement> half_alpha; // half the simple roots
419 
420  void check_y(const TorusElement& t, InvolutionNbr i) const;
421  void parent_cross_act(nblock_elt& z, weyl::Generator s) const;
422  void parent_up_Cayley(nblock_elt& z, weyl::Generator s) const;
423  void parent_down_Cayley(nblock_elt& z, weyl::Generator s) const;
424 
425 public:
426  nblock_help(RealReductiveGroup& GR, const SubSystem& subsys);
427 
428  void cross_act(nblock_elt& z, weyl::Generator s) const;
429  void cross_act_parent_word(const WeylWord& ww, nblock_elt& z) const;
430  void do_up_Cayley (nblock_elt& z, weyl::Generator s) const;
431  void do_down_Cayley (nblock_elt& z, weyl::Generator s) const;
432  bool is_real_nonparity(nblock_elt z, weyl::Generator s) const; // by value
433 
434  void twist(nblock_elt& z) const;
435 
436  y_entry pack_y(const nblock_elt& z) const;
437 }; // |class nblock_help|
438 
439 } // |namespace blocks|
440 
441 } // |namespace atlas|
442 #endif
StandardRepr * sr
Definition: reprmode.cpp:82
ext_gen(weyl::Generator s)
Definition: blocks.h:57
enum atlas::blocks::ext_gen::@12 type
unsigned int InvolutionNbr
Definition: Atlas.h:281
KGBElt x
Definition: blocks.h:74
WeylElt TwistedInvolution
Definition: Atlas.h:231
BlockEltPair cayley(weyl::Generator s, BlockElt z) const
Definition: blocks.h:154
const TwistedWeylGroup & tW
Definition: blocks.h:238
Definition: blocks.h:53
size_t size() const
Definition: blocks.h:132
RankFlags singular
Definition: blocks.h:321
~Block()
Definition: blocks.h:265
Definition: kl.h:49
const WeylGroup & weylGroup() const
Definition: blocks.h:276
Class definitions and function declarations for DynkinDiagram.
std::vector< TorusElement > half_alpha
Definition: blocks.h:418
unsigned long size
Definition: testprint.cpp:46
std::vector< EltInfo > info
Definition: blocks.h:100
kl::KLContext & klc(BlockElt last_y, bool verbose)
Definition: blocks.h:199
bool operator!=(const type_expr &x, const type_expr &y)
Definition: axis-types.h:374
KGBElt x(BlockElt z) const
Definition: blocks.h:141
const Rep_context & rc
Definition: blocks.h:318
std::pair< BlockElt, BlockElt > BlockEltPair
Definition: Atlas.h:369
std::vector< std::vector< block_fields > > data
Definition: blocks.h:101
y_part_hash y_hash
Definition: blocks.h:327
Partition orbits(const F &, unsigned long, unsigned long)
Definition: blocks.h:362
BlockElt dual
Definition: blocks.h:77
DynkinDiagram folded(const DynkinDiagram &diag, const std::vector< ext_gen > &orbit)
Definition: blocks.cpp:1744
size_t Cartan_class(BlockElt z) const
Definition: blocks.h:281
Definition: blocks.h:69
bool isWeakDescent(weyl::Generator s, BlockElt z) const
Definition: blocks.h:173
BlockElt cross(weyl::Generator s, BlockElt z) const
Definition: blocks.h:151
BitSet< constants::RANK_MAX > RankFlags
Definition: Atlas.h:60
virtual KGBElt xsize() const
Definition: blocks.h:352
std::vector< ext_gen > orbits
Definition: blocks.h:102
DescentStatus descent
Definition: blocks.h:75
Definition: blocks.h:53
EltInfo(KGBElt xx, KGBElt yy, unsigned short ll)
Definition: blocks.h:80
Definition: blocks.h:72
virtual KGBElt xsize() const
Definition: blocks.h:278
BlockElt Hermitian_dual(BlockElt z) const
Definition: blocks.h:181
virtual const TwistedInvolution & involution(BlockElt z) const
Returns the twisted involution corresponding to z.
Definition: blocks.h:292
BlockEltPair inverseCayley(weyl::Generator s, BlockElt z) const
Definition: blocks.h:161
std::vector< KGBElt > x_of
Definition: blocks.h:324
HashTable< block_elt_entry, BlockElt > block_hash
Definition: blocks.h:360
weyl::Generator s0
Definition: blocks.h:54
BruhatOrder * d_bruhat
Definition: blocks.h:110
TwistedInvolutionList d_involution
Definition: blocks.h:245
const TwistedWeylGroup & twistedWeylGroup() const
Definition: blocks.h:275
KGBElt y
Definition: blocks.h:74
ext_gen(bool commute, weyl::Generator s, weyl::Generator t)
Definition: blocks.h:59
Definition: cweave.c:245
KGBElt parent_x(BlockElt z) const
Definition: blocks.h:341
KGBElt x() const
Definition: blocks.h:403
const InvolutionTable & i_tab
Definition: blocks.h:414
HashTable< y_entry, KGBElt > y_part_hash
Definition: blocks.h:312
BlockEltPair Cayley_image
Definition: blocks.h:95
bool verbose
Definition: KLread.cpp:136
Definition: blocks.h:395
kl::KLContext * klc_ptr
Definition: blocks.h:111
std::vector< EltInfo > Pooltype
Definition: blocks.h:84
TorusElement yy
Definition: blocks.h:399
std::vector< BlockElt > dual_map(const Block_base &b, const Block_base &dual_b)
Definition: blocks.cpp:1731
size_t max_Cartan() const
Definition: blocks.h:284
TwistedInvolution dual_involution(const TwistedInvolution &w, const TwistedWeylGroup &tW, const TwistedWeylGroup &dual_tW)
Returns the twisted involution dual to |w|.
Definition: blocks.cpp:1719
size_t hashCode(size_t modulus) const
Definition: blocks.h:85
const RootDatum & rd
Definition: blocks.h:412
weyl::Generator s1
Definition: blocks.h:54
ext_gen orbit(weyl::Generator s) const
Definition: blocks.h:138
RankFlags singular_simple_roots()
Definition: blocks.h:347
block_fields()
Definition: blocks.h:96
const SubSystem & sub
Definition: blocks.h:413
std::vector< TorusPart > dual_m_alpha
Definition: blocks.h:417
BlockElt cross_image
Definition: blocks.h:94
const DescentStatus & descent(BlockElt z) const
Definition: blocks.h:168
WeightInvolution involution(const Layout &lo)
Definition: lietype.cpp:463
const std::vector< ext_gen > & fold_orbits() const
Definition: blocks.h:139
virtual KGBElt ysize() const
Definition: blocks.h:353
unsigned int KGBElt
Definition: Atlas.h:339
y_entry::Pooltype y_pool
Definition: blocks.h:326
DynkinDiagram dd
Definition: blocks.h:108
std::vector< KGBElt > kgb_nr_of
Definition: blocks.h:323
Definition: blocks.h:408
std::vector< RankFlags > d_involutionSupport
Flags the generators occurring in reduced expression for |d_involution|.
Definition: blocks.h:250
const KGB & kgb
Definition: blocks.h:411
Block_base::EltInfo block_elt_entry
Definition: blocks.h:359
virtual KGBElt ysize() const
Definition: blocks.h:279
unsigned short RealFormNbr
Definition: Atlas.h:302
std::vector< TwistedInvolution > TwistedInvolutionList
Definition: Atlas.h:235
Definition: blocks.h:53
Definition: repr.h:89
size_t length(BlockElt z) const
Definition: blocks.h:147
int length() const
Definition: blocks.h:65
Definition: blocks.h:315
Represents a block of representations of an inner form of G.
Definition: blocks.h:236
struct lambda_node * lambda
Definition: parse_types.h:94
Definition: blocks.h:51
KGBElt y(BlockElt z) const
Definition: blocks.h:142
const DynkinDiagram & Dynkin() const
Definition: blocks.h:137
Definition: Atlas.h:38
std::vector< BlockElt > d_first_z_of_x
Definition: blocks.h:106
void print(char *s,...)
Definition: common.c:861
EltInfo(KGBElt xx, KGBElt yy, DescentStatus dd, unsigned short ll)
Definition: blocks.h:78
unsigned short length
Definition: blocks.h:76
Class definition for the class DescentStatus.
WeylWord w_tau
Definition: blocks.h:55
block_hash z_hash
Definition: blocks.h:368
KGBElt xx
Definition: blocks.h:398
size_t rank() const
Definition: blocks.h:130
const TorusElement & y() const
Definition: blocks.h:404
BruhatOrder & bruhatOrder()
Definition: blocks.h:198
size_t xrange
Definition: blocks.h:240
unsigned char Generator
Definition: Atlas.h:226
unsigned int BlockElt
Definition: Atlas.h:367
size_t yrange
Definition: blocks.h:241
DescentStatus::Value descentValue(weyl::Generator s, BlockElt z) const
Definition: blocks.h:170
std::vector< BlockElt > BlockEltList
Definition: Atlas.h:368
BitMap common_Cartans(RealReductiveGroup &GR, RealReductiveGroup &dGR)
Definition: blocks.cpp:1774
size_t folded_rank() const
Definition: blocks.h:131
nblock_elt(KGBElt x, const TorusElement &t)
Definition: blocks.h:401
const TorusElement & y_rep(KGBElt y) const
Definition: blocks.h:342
RatWeight infin_char
Definition: blocks.h:320
std::vector< size_t > d_Cartan
Definition: blocks.h:244
const RatWeight & gamma() const
Definition: blocks.h:340
const RankFlags & involutionSupport(BlockElt z) const
the simple roots occurring in reduced expression |involution(z)|
Definition: blocks.h:296