atlas  0.6
involutions.h
Go to the documentation of this file.
1 /*
2  This is involutions.h
3 
4  Copyright (C) 2011 Marc van Leeuwen
5  part of the Atlas of Lie Groups and Representations
6 
7  For license information see the LICENSE file
8 */
9 
10 #ifndef INVOLUTIONS_H /* guard against multiple inclusions */
11 #define INVOLUTIONS_H
12 
13 #include <vector>
14 #include <cassert>
15 #include <functional>
16 
17 #include "../Atlas.h"
18 
19 #include "hashtable.h" // containment
20 #include "permutations.h"// containment root permutation in |InvolutionData|
21 #include "bitmap.h" // containment root sets in |InvolutionData|
22 
23 #include "weyl.h" // containment of |WI_Entry|
24 #include "subquotient.h" // containment of |SmallSubspace|
25 
26 /* The purpose of this module is to provide a central registry of (twisted)
27  involutions, in the form of a hash table to encode them by numbers, and
28  supplementary information in the form of a table indexed by those numbers.
29  This information, which includes root classification and the (somewhat
30  voluminous) involution matrix, is generated as soon a an involution is
31  registered here, which happens for whole twisted conjugacy classes at a
32  time, through a call to |Cartan_orbits::add| defined below. If user code
33  should need additional information associated involutions, it might define
34  an array indexed by |InvolutionNbr|; but currently this happens nowhere.
35  */
36 
37 namespace atlas {
38 
39 namespace involutions {
40 
41 
42 // this class gathers some information associated to a root datum involution
43 // the data depends only on the permutation of the |RootSystem| by |theta|
45 {
46  Permutation d_rootInvolution; // permutation of all roots
48  RootNbrList d_simpleImaginary; // imaginary roots simple wrt subsystem
49  RootNbrList d_simpleReal; // real roots simple wrt subsystem
50  public:
51  InvolutionData(const RootDatum& rd,
52  const WeightInvolution& theta);
53  InvolutionData(const RootDatum& rd,
54  const WeightInvolution& theta,
55  const RootNbrSet& positive_subsystem);
56  InvolutionData(const RootSystem& rs,
57  const RootNbrList& simple_images);
58  static InvolutionData build(const RootSystem& rs,
59  const TwistedWeylGroup& W,
60  const TwistedInvolution& tw);
61  void swap(InvolutionData&);
62  // manipulators
63 private:
64  void classify_roots(const RootSystem& rs); // workhorse for contructors
65 public:
66  void cross_act(const Permutation& r_perm); // change (cheaply) to conjugate
67 
68  //accessors
69  const Permutation& root_involution() const
70  { return d_rootInvolution; }
72  { return d_rootInvolution[alpha]; }
73  const RootNbrSet& imaginary_roots() const { return d_imaginary; }
74  const RootNbrSet& real_roots() const { return d_real; }
75  const RootNbrSet& complex_roots() const { return d_complex; }
76  size_t imaginary_rank() const { return d_simpleImaginary.size(); }
78  { return d_simpleImaginary; }
79  RootNbr imaginary_basis(size_t i) const
80  { return d_simpleImaginary[i]; }
81  size_t real_rank() const { return d_simpleReal.size(); }
82  const RootNbrList& real_basis() const { return d_simpleReal; }
83  RootNbr real_basis(size_t i) const { return d_simpleReal[i]; }
84 
85 }; // |class InvolutionData|
86 
87 typedef unsigned int InvolutionNbr;
88 
90 {
91  public: // there is no danger to expose these constant references
92  const RootDatum& rd;
94  const TwistedWeylGroup& tW;
95 
96  private:
98  HashTable<weyl::TI_Entry, InvolutionNbr> hash;
99 
100  struct record
101  {
102  InvolutionData id; // stuff that does not involve weight coordinates
104  int_Matrix projector; // for |y|, same kernel as |row_saturate(theta-id)|
105  int_Matrix M_real; // $1-\theta$; then expression in scaled adapted basis
106  int_Vector diagonal; // divisors for image of |M_real|
107  int_Matrix lift_mat; // section: satisfies |lift_mat*M_real==1-theta|
108  unsigned int length;
109  unsigned int W_length;
111 
113  const InvolutionData& inv_d,
114  const int_Matrix& proj,
115  const int_Matrix& Mre, const std::vector<int>&d, const int_Matrix& lm,
116  unsigned int l,
117  unsigned int Wl,
118  const SmallSubspace& ms)
119  : id(inv_d), theta(inv)
120  , projector(proj), M_real(Mre), diagonal(d), lift_mat(lm)
121  , length(l), W_length(Wl), mod_space(ms) {}
122  };
123 
124  std::vector<record> data;
125  std::vector<BinaryMap> torus_simple_reflection;
126 
127  public:
128  InvolutionTable // constructor; starts without any involutions
129  (const RootDatum& , const WeightInvolution&, const TwistedWeylGroup&);
130 
131  //accessors
132  size_t size() const { return pool.size(); }
133  bool unseen(const TwistedInvolution& tw) const
134  { return hash.find(weyl::TI_Entry(tw))==hash.empty; }
135  InvolutionNbr nr(const TwistedInvolution& tw) const
136  { return hash.find(weyl::TI_Entry(tw)); }
137 
138  unsigned int semisimple_rank() const { return tW.rank(); }
139 
140  const weyl::TI_Entry& involution(InvolutionNbr n) const
141  { assert(n<size()); return pool[n]; }
142 
143  const WeightInvolution& matrix(InvolutionNbr n) const
144  { assert(n<size()); return data[n].theta; }
145  const WeightInvolution& matrix(const TwistedInvolution& tw) const
146  { return matrix(nr(tw)); }
147 
148  unsigned int length(InvolutionNbr n) const
149  { assert(n<size()); return data[n].length; }
150  unsigned int Weyl_length(InvolutionNbr n) const
151  { assert(n<size()); return data[n].W_length; }
152 
153  unsigned int length(const TwistedInvolution& tw) const
154  { return length(nr(tw)); }
155  unsigned int Weyl_length(const TwistedInvolution& tw) const
156  { return Weyl_length(nr(tw)); }
157 
158  const Permutation& root_involution(InvolutionNbr n) const
159  { assert(n<size()); return data[n].id.root_involution(); }
160  RootNbr root_involution(InvolutionNbr n,RootNbr alpha) const
161  { assert(n<size()); return data[n].id.root_involution(alpha); }
162  const RootNbrSet& imaginary_roots(InvolutionNbr n) const
163  { assert(n<size()); return data[n].id.imaginary_roots(); }
164  const RootNbrSet& real_roots(InvolutionNbr n) const
165  { assert(n<size()); return data[n].id.real_roots(); }
166  const RootNbrSet& complex_roots(InvolutionNbr n) const
167  { assert(n<size()); return data[n].id.complex_roots(); }
168  size_t imaginary_rank(InvolutionNbr n) const
169  { assert(n<size()); return data[n].id.imaginary_rank(); }
170  const RootNbrList& imaginary_basis(InvolutionNbr n) const
171  { assert(n<size()); return data[n].id.imaginary_basis(); }
172  RootNbr imaginary_basis(InvolutionNbr n,weyl::Generator i) const
173  { assert(n<size()); return data[n].id.imaginary_basis(i); }
174  size_t real_rank(InvolutionNbr n) const
175  { assert(n<size()); return data[n].id.real_rank(); }
176  const RootNbrList& real_basis(InvolutionNbr n) const
177  { assert(n<size()); return data[n].id.real_basis(); }
178  RootNbr real_basis(InvolutionNbr n,weyl::Generator i) const
179  { assert(n<size()); return data[n].id.real_basis(i); }
180 
181  bool is_complex_simple(InvolutionNbr n,weyl::Generator s) const;
182  bool is_imaginary_simple(InvolutionNbr n,weyl::Generator s) const;
183  bool is_real_simple(InvolutionNbr n,weyl::Generator s) const;
184 
185  bool is_complex_descent(InvolutionNbr n,RootNbr alpha) const;
186 
187  void reduce(TitsElt& a) const;
188 
189  const SmallSubspace& mod_space(InvolutionNbr n) const
190  { assert(n<size()); return data[n].mod_space; }
191 
192  bool equivalent(const TorusElement& t1, const TorusElement& t2,
193  InvolutionNbr i) const;
194  RatWeight fingerprint(const TorusElement& t, InvolutionNbr i) const;
195  y_entry pack(const TorusElement& t, InvolutionNbr i) const;
196  KGB_elt_entry x_pack(const GlobalTitsElement& x) const; // for X only; slow
197  bool x_equiv(const GlobalTitsElement& x0,const GlobalTitsElement& x1) const;
198 
199  // choose unique representative for real projection of rational weight
200  void real_unique(InvolutionNbr i, RatWeight& y) const;
201 
202  // pack $\lambda-\rho$ into a |TorusPart|
203  TorusPart pack(InvolutionNbr i, const Weight& lambda_rho) const;
204  Weight unpack(InvolutionNbr i, TorusPart y_part) const;
205 
206  // the following produces a light-weight function object calling |involution|
207  class mapper
208  // : public std::unary_function<InvolutionNbr,const weyl::TI_Entry& >
209  {
211  public:
212  mapper(const InvolutionTable* tab) : t(*tab) {}
213  const weyl::TI_Entry& operator() (InvolutionNbr n) const
214  { return t.involution(n); }
215  };
216  mapper as_map() const { return mapper(this); }
217 
218  // manipulators
219  InvolutionNbr add_involution(const TwistedInvolution& tw);
220  InvolutionNbr add_cross(weyl::Generator s, InvolutionNbr n);
221 
222  void reserve(size_t s) { pool.reserve(s); }
223 
224 }; // |class InvolutionTable|
225 
227 {
228  unsigned int Cartan_class_nbr;
229  InvolutionNbr start,size;
230 
231  Cartan_orbit(InvolutionTable& i_tab,InnerClass& G, CartanNbr cn);
232 
233  bool contains(InvolutionNbr i) const { return i-start<size; }
234  InvolutionNbr end() const { return start+size; }
235 
236 }; // |struct Cartan_orbit|
237 
238 
239 // we organize everything by Cartan classes of involutions
240 
242 {
243  std::vector<Cartan_orbit> orbit; // orbits of Cartan classes that were added
244  std::vector<unsigned int> Cartan_index; // maps Cartan number to its position
245 
246  unsigned int locate(InvolutionNbr i) const;
247 public:
248  Cartan_orbits (const RootDatum& rd, const WeightInvolution& theta,
249  const TwistedWeylGroup& tW)
250  : InvolutionTable(rd,theta,tW), orbit(), Cartan_index() { }
251 
252 // manipulators
253 
254  void set_size(CartanNbr n_Cartans); // resize once number of Cartans is known
255  void add(InnerClass& G, CartanNbr cn);
256 
257 // accessors
258 
259  // this method allows mostly finding the range of a given Cartan class
261  { assert(Cartan_index[cn]!=CartanNbr(~0u)); return orbit[Cartan_index[cn]]; }
262 
263  CartanNbr Cartan_class(InvolutionNbr i) const
264  { return orbit[locate(i)].Cartan_class_nbr; }
266  { return Cartan_class(nr(tw)); }
267 
268  size_t total_size(const BitMap& Cartan_classes) const;
269 
270  // make class useful as comparison object, for |std::sort|
271  class comparer
272  {
273  const Cartan_orbits& t;
274  public:
275  comparer(const Cartan_orbits* o) : t(*o) {}
276  // whether involution |i| less than |j| by length; Weyl length; |i<j|
277  bool operator() (InvolutionNbr i, InvolutionNbr j) const;
278  };
279  comparer less() const { return comparer(this); }
280 
281 }; // |class Cartan_orbits|
282 
283 
284 
285 
286 } // |namespace involutions|
287 
288 } // |namespace atlas|
289 
290 #endif
unsigned int length(const TwistedInvolution &tw) const
Definition: involutions.h:153
size_t size() const
Definition: involutions.h:132
InvolutionData(const RootDatum &rd, const WeightInvolution &theta)
Definition: involutions.cpp:31
WeylElt TwistedInvolution
Definition: Atlas.h:231
const TwistedWeylGroup & tW
Definition: involutions.h:94
InvolutionNbr start
Definition: involutions.h:229
const Permutation & root_involution(InvolutionNbr n) const
Definition: involutions.h:158
InvolutionNbr nr(const TwistedInvolution &tw) const
Definition: involutions.h:135
void swap(InvolutionData &)
Definition: involutions.cpp:109
unsigned long size
Definition: testprint.cpp:46
unsigned int semisimple_rank() const
Definition: involutions.h:138
const WeightInvolution & delta
Definition: involutions.h:93
Permutation d_rootInvolution
Definition: involutions.h:46
int_Matrix M_real
Definition: involutions.h:105
void cross_act(const Permutation &r_perm)
Definition: involutions.cpp:120
const SmallSubspace & mod_space(InvolutionNbr n) const
Definition: involutions.h:189
Cartan_orbits(const RootDatum &rd, const WeightInvolution &theta, const TwistedWeylGroup &tW)
Definition: involutions.h:248
RootNbr imaginary_basis(InvolutionNbr n, weyl::Generator i) const
Definition: involutions.h:172
void reduce(reduction *rule)
Definition: cweave.c:2261
const InvolutionTable & t
Definition: involutions.h:210
int_Matrix projector
Definition: involutions.h:104
Definition: involutions.h:44
std::vector< unsigned int > Cartan_index
Definition: involutions.h:244
size_t imaginary_rank(InvolutionNbr n) const
Definition: involutions.h:168
RootNbr real_basis(InvolutionNbr n, weyl::Generator i) const
Definition: involutions.h:178
Definition: involutions.h:100
const WeightInvolution & matrix(const TwistedInvolution &tw) const
Definition: involutions.h:145
CartanNbr Cartan_class(InvolutionNbr i) const
Definition: involutions.h:263
WeightInvolution theta
Definition: involutions.h:103
Definition: involutions.h:89
int length
Definition: common.c:103
size_t real_rank() const
Definition: involutions.h:81
const Permutation & root_involution() const
Definition: involutions.h:69
int_Vector diagonal
Definition: involutions.h:106
RootNbrSet d_real
Definition: involutions.h:47
RootNbr root_involution(InvolutionNbr n, RootNbr alpha) const
Definition: involutions.h:160
std::vector< Cartan_orbit > orbit
Definition: involutions.h:243
HashTable< weyl::TI_Entry, InvolutionNbr > hash
Definition: involutions.h:98
const RootNbrSet & complex_roots() const
Definition: involutions.h:75
const RootNbrList & imaginary_basis() const
Definition: involutions.h:77
RootNbrSet d_imaginary
Definition: involutions.h:47
size_t real_rank(InvolutionNbr n) const
Definition: involutions.h:174
RootNbr real_basis(size_t i) const
Definition: involutions.h:83
unsigned int length
Definition: involutions.h:108
comparer(const Cartan_orbits *o)
Definition: involutions.h:275
RootNbrSet d_complex
Definition: involutions.h:47
const RootNbrSet & imaginary_roots(InvolutionNbr n) const
Definition: involutions.h:162
void reserve(size_t s)
Definition: involutions.h:222
InvolutionNbr end() const
Definition: involutions.h:234
Class definitions and function declarations for WeylGroup.
unsigned int length(InvolutionNbr n) const
Definition: involutions.h:148
comparer less() const
Definition: involutions.h:279
unsigned int InvolutionNbr
Definition: involutions.h:87
record(const WeightInvolution &inv, const InvolutionData &inv_d, const int_Matrix &proj, const int_Matrix &Mre, const std::vector< int > &d, const int_Matrix &lm, unsigned int l, unsigned int Wl, const SmallSubspace &ms)
Definition: involutions.h:112
std::vector< record > data
Definition: involutions.h:124
const WeightInvolution & matrix(InvolutionNbr n) const
Definition: involutions.h:143
mapper as_map() const
Definition: involutions.h:216
const weyl::TI_Entry & involution(InvolutionNbr n) const
Definition: involutions.h:140
const RootNbrList & imaginary_basis(InvolutionNbr n) const
Definition: involutions.h:170
void classify_roots(const RootSystem &rs)
Definition: involutions.cpp:41
size_t imaginary_rank() const
Definition: involutions.h:76
RootNbr imaginary_basis(size_t i) const
Definition: involutions.h:79
const RootNbrList & real_basis() const
Definition: involutions.h:82
const Cartan_orbits & t
Definition: involutions.h:273
Definition: weyl.h:780
std::vector< BinaryMap > torus_simple_reflection
Definition: involutions.h:125
int_Matrix lift_mat
Definition: involutions.h:107
const RootNbrSet & complex_roots(InvolutionNbr n) const
Definition: involutions.h:166
unsigned int W_length
Definition: involutions.h:109
const RootNbrSet & real_roots(InvolutionNbr n) const
Definition: involutions.h:164
unsigned short CartanNbr
Definition: Atlas.h:301
Definitions and declarations for the BitMap class.
const RootNbrList & real_basis(InvolutionNbr n) const
Definition: involutions.h:176
SmallSubspace mod_space
Definition: involutions.h:110
RootNbr root_involution(RootNbr alpha) const
Definition: involutions.h:71
static InvolutionData build(const RootSystem &rs, const TwistedWeylGroup &W, const TwistedInvolution &tw)
Definition: involutions.cpp:104
unsigned long n
Definition: axis.cpp:77
Definition: Atlas.h:38
const RootNbrSet & imaginary_roots() const
Definition: involutions.h:73
unsigned int Cartan_class_nbr
Definition: involutions.h:228
Definition: involutions.h:271
CartanNbr Cartan_class(const TwistedInvolution &tw) const
Definition: involutions.h:265
Definition: involutions.h:226
const RootNbrSet & real_roots() const
Definition: involutions.h:74
Container of a large (more than twice the machine word size) set of bits.
Definition: bitmap.h:52
RootNbrList d_simpleReal
Definition: involutions.h:49
unsigned short RootNbr
Definition: Atlas.h:216
SmallBitVector TorusPart
Definition: Atlas.h:256
bool unseen(const TwistedInvolution &tw) const
Definition: involutions.h:133
Definition: involutions.h:207
unsigned char Generator
Definition: Atlas.h:226
const RootDatum & rd
Definition: involutions.h:92
unsigned int Weyl_length(const TwistedInvolution &tw) const
Definition: involutions.h:155
const Cartan_orbit & operator[](CartanNbr cn) const
Definition: involutions.h:260
RootNbrList d_simpleImaginary
Definition: involutions.h:48
std::vector< RootNbr > RootNbrList
Definition: Atlas.h:217
InvolutionData id
Definition: involutions.h:102
std::vector< TI_Entry > Pooltype
Definition: weyl.h:787
mapper(const InvolutionTable *tab)
Definition: involutions.h:212
Definition: involutions.h:241
weyl::TI_Entry::Pooltype pool
Definition: involutions.h:97
bool contains(InvolutionNbr i) const
Definition: involutions.h:233
unsigned int Weyl_length(InvolutionNbr n) const
Definition: involutions.h:150