00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include "blocks.h"
00029
00030 #ifdef VERBOSE
00031 #include <iostream>
00032 #endif
00033
00034 #include <cassert>
00035 #include <memory>
00036 #include <set>
00037
00038 #include "basic_io.h"
00039 #include "bruhat.h"
00040 #include "complexredgp.h"
00041 #include "cartanset.h"
00042 #include "descents.h"
00043 #include "kgb.h"
00044 #include "realredgp.h"
00045 #include "tags.h"
00046 #include "weyl.h"
00047 #include "hashtable.h"
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131 namespace atlas {
00132
00133 namespace blocks {
00134 namespace {
00135
00136
00137 using namespace blocks;
00138
00139 weyl::WeylInterface
00140 correlation(const weyl::WeylGroup& W,const weyl::WeylGroup& dW);
00141
00142 descents::DescentStatus descents(kgb::KGBElt x,
00143 kgb::KGBElt y,
00144 const kgb::KGB& kgb,
00145 const kgb::KGB& dual_kgb);
00146
00147 void insertAscents(std::set<BlockElt>&, const set::SetEltList&, size_t,
00148 const Block&);
00149 void makeHasse(std::vector<set::SetEltList>&, const Block&);
00150
00151
00152 }
00153
00154 }
00155
00156
00157
00158
00159
00160
00161
00162 namespace blocks {
00163
00164
00165
00166
00167
00168
00169
00170
00171 Block::Block(complexredgp::ComplexReductiveGroup& G,
00172 realform::RealForm rf, realform::RealForm df,
00173 bool select_Cartans)
00174 : d_realForm(rf)
00175 , d_dualForm(df)
00176 , d_rank(G.semisimpleRank())
00177 , d_weylGroup(G.weylGroup())
00178 , d_xrange(0), d_yrange(0)
00179 , d_x(), d_y(), d_first_z_of_x()
00180 , d_cross(d_rank), d_cayley(d_rank)
00181 , d_descent(), d_length(), d_Cartan(), d_involution()
00182 , d_involutionSupport()
00183 , d_state()
00184 , d_bruhat(NULL)
00185 {
00186 realredgp::RealReductiveGroup G_R(G,rf);
00187 complexredgp::ComplexReductiveGroup dG(G,tags::DualTag());
00188 realredgp::RealReductiveGroup dG_R(dG,df);
00189 dG_R.fillCartan();
00190
00191 #ifdef VERBOSE
00192 std::cerr << "entering block construction... " << std::flush;
00193 #endif
00194
00195 generate(G_R,dG_R,select_Cartans);
00196
00197
00198 d_involutionSupport.reserve(size());
00199 for (BlockElt z=0; z<size() and d_length[z]==d_length[0]; ++z)
00200 {
00201 if (z==0 or d_involution[z]!=d_involution[z-1])
00202 {
00203 bitset::RankFlags support;
00204 weyl::WeylWord ww=weylGroup().word(d_involution[z]);
00205 for (size_t j=0; j<ww.size(); ++j)
00206 support.set(ww[j]);
00207 d_involutionSupport.push_back(support);
00208 }
00209 else
00210 d_involutionSupport.push_back(d_involutionSupport.back());
00211 }
00212
00213
00214 for (BlockElt z=d_involutionSupport.size(); z<size(); ++z)
00215 {
00216 size_t s = firstStrictDescent(z);
00217 assert (s<d_rank);
00218 descents::DescentStatus::Value v = descentValue(s,z);
00219 if (v == descents::DescentStatus::ComplexDescent)
00220 {
00221 d_involutionSupport[z] = d_involutionSupport[cross(s,z)];
00222 d_involutionSupport[z].set(s);
00223 d_involutionSupport[z].set(weylGroup().twisted(s));
00224 }
00225 else
00226 {
00227 d_involutionSupport[z] = d_involutionSupport[inverseCayley(s,z).first];
00228 d_involutionSupport[z].set(s);
00229 }
00230 }
00231
00232
00233 #ifdef VERBOSE
00234 std::cerr << "done" << std::endl;
00235 #endif
00236 }
00237
00238
00239 Block::~Block()
00240
00241 {
00242 delete d_bruhat;
00243 }
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258 BlockElt Block::element(kgb::KGBElt x,kgb::KGBElt y) const
00259 {
00260 BlockElt first=d_first_z_of_x[x];
00261 BlockElt z = first +(y-d_y[first]);
00262 assert(z<size() and d_x[z]==x and d_y[z]==y);
00263 return z;
00264 }
00265
00266
00267
00268
00269
00270
00271
00272 bool Block::isStrictAscent(size_t s, BlockElt z) const
00273 {
00274 using namespace descents;
00275
00276 DescentStatus::Value v = descentValue(s,z);
00277 return not DescentStatus::isDescent(v) and v!=DescentStatus::RealNonparity;
00278 }
00279
00280
00281
00282
00283
00284
00285
00286 bool Block::isStrictDescent(size_t s, BlockElt z) const
00287 {
00288 using descents::DescentStatus;
00289
00290 DescentStatus::Value v = descentValue(s,z);
00291 return DescentStatus::isDescent(v) and v!=DescentStatus::ImaginaryCompact;
00292 }
00293
00294
00295
00296
00297
00298 size_t Block::firstStrictDescent(BlockElt z) const
00299 {
00300 for (size_t s = 0; s < rank(); ++s)
00301 if (isStrictDescent(s,z))
00302 return s;
00303
00304 return rank();
00305 }
00306
00307
00308
00309
00310
00311 size_t Block::firstStrictGoodDescent(BlockElt z) const
00312 {
00313 for (size_t s = 0; s < rank(); ++s)
00314 if (isStrictDescent(s,z) and
00315 descentValue(s,z)!=descents::DescentStatus::RealTypeII)
00316 return s;
00317
00318 return rank();
00319 }
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330 BlockEltPair Block::link(size_t alpha,size_t beta,BlockElt y) const
00331 {
00332 const descents::DescentStatus& desc=descent(y);
00333
00334 std::vector<BlockElt> result(2,UndefBlock);
00335 std::vector<BlockElt>::iterator it=result.begin();
00336
00337 BlockEltPair p=inverseCayley(alpha,y);
00338 switch (desc[alpha])
00339 {
00340 case descents::DescentStatus::ComplexDescent:
00341 {
00342 BlockElt y1=cross(alpha,y);
00343 if (isWeakDescent(beta,y1))
00344 *it++=y1;
00345 break;
00346 }
00347 case descents::DescentStatus::RealTypeI:
00348 if (isWeakDescent(beta,p.second))
00349 *it++=p.second;
00350
00351 case descents::DescentStatus::RealTypeII:
00352 if (isWeakDescent(beta,p.first))
00353 *it++=p.first;
00354 break;
00355 default: {}
00356 }
00357
00358 p=cayley(beta,y);
00359 switch (desc[beta])
00360 {
00361 case descents::DescentStatus::ComplexAscent:
00362 {
00363 BlockElt y1=cross(beta,y);
00364 if (not isWeakDescent(alpha,y1))
00365 *it++=y1;
00366 break;
00367 }
00368 case descents::DescentStatus::ImaginaryTypeII:
00369 if (not isWeakDescent(alpha,p.second))
00370 *it++=p.second;
00371
00372 case descents::DescentStatus::ImaginaryTypeI:
00373 if (not isWeakDescent(alpha,p.first))
00374 *it++=p.first;
00375 break;
00376 default: {}
00377 }
00378
00379 assert(&*it<=&result[2]);
00380
00381 return std::make_pair(result[0],result[1]);
00382 }
00383
00384
00385
00386
00387
00388 void Block::generate(realredgp::RealReductiveGroup& G,
00389 realredgp::RealReductiveGroup& dG,
00390 bool select_Cartans)
00391 {
00392 kgb::KGB kgb(G,select_Cartans ? common_Cartans(G,dG) : bitmap::BitMap(0));
00393 kgb::KGB dual_kgb
00394 (dG,select_Cartans ? common_Cartans(dG,G) : bitmap::BitMap(0));
00395
00396 #ifdef VERBOSE
00397 std::cerr << "K\\G/B and dual generated... " << std::flush;
00398 #endif
00399
00400 const weyl::WeylGroup& dual_Weyl_group(dual_kgb.weylGroup());
00401 weyl::WeylInterface to_dual_Weyl=correlation(d_weylGroup,dual_Weyl_group);
00402
00403
00404 d_xrange = kgb.size();
00405 d_yrange = dual_kgb.size();
00406
00407 complexredgp::ComplexReductiveGroup& G_C = G.complexGroup();
00408 size_t size=G_C.blockSize(d_realForm,d_dualForm);
00409
00410 d_x.reserve(size);
00411 d_y.reserve(size);
00412 d_first_z_of_x.reserve(d_xrange+1);
00413
00414 d_involution.reserve(size);
00415 d_length.reserve(size);
00416 d_Cartan.reserve(size);
00417 d_descent.reserve(size);
00418
00419 {
00420 kgb::KGBElt x = 0;
00421 BlockElt base_z = 0;
00422
00423 while (x<kgb.size())
00424 {
00425 const weyl::TwistedInvolution& w = kgb.involution(x);
00426
00427 kgb::KGBEltPair xRange = kgb.tauPacket(w);
00428 kgb::KGBEltPair yRange =
00429 dual_kgb.tauPacket(dualInvolution(w,to_dual_Weyl));
00430
00431 for (assert(x==xRange.first); x < xRange.second; ++x)
00432 {
00433 d_first_z_of_x.push_back(base_z);
00434 for (size_t y = yRange.first; y < yRange.second; ++y)
00435 {
00436 d_x.push_back(x);
00437 d_y.push_back(y);
00438 d_involution.push_back(w);
00439 d_length.push_back(kgb.length(x));
00440 d_Cartan.push_back(kgb.Cartan_class(x));
00441 d_descent.push_back(descents(x,y,kgb,dual_kgb));
00442 }
00443 base_z += yRange.second - yRange.first;
00444 }
00445 }
00446
00447 assert(base_z == size);
00448 d_first_z_of_x.push_back(base_z);
00449
00450 assert(d_first_z_of_x.size()==d_xrange+1);
00451 assert(d_x.size()==size);
00452 }
00453
00454
00455
00456 for (size_t s = 0; s < d_rank; ++s)
00457 {
00458 d_cross[s].resize(size);
00459 d_cayley[s].resize(size,std::make_pair(UndefBlock,UndefBlock));
00460 for (BlockElt z = 0; z<size; ++z)
00461 {
00462 d_cross[s][z] = element(kgb.cross(s,x(z)),dual_kgb.cross(s,y(z)));
00463 switch (d_descent[z][s])
00464 {
00465 default: break;
00466 case descents::DescentStatus::ImaginaryTypeII:
00467 {
00468 BlockElt z1=element(kgb.cayley(s,x(z)),
00469 dual_kgb.inverseCayley(s,y(z)).second);
00470 d_cayley[s][z].second = z1;
00471 d_cayley[s][z1].first = z;
00472 }
00473
00474 case descents::DescentStatus::ImaginaryTypeI:
00475 {
00476 BlockElt z0=element(kgb.cayley(s,x(z)),
00477 dual_kgb.inverseCayley(s,y(z)).first);
00478 d_cayley[s][z].first = z0;
00479 BlockEltPair& ic = d_cayley[s][z0];
00480 if (ic.first==UndefBlock)
00481 ic.first = z;
00482 else
00483 ic.second = z;
00484 }
00485 }
00486 }
00487 }
00488
00489
00490 }
00491
00492
00493
00494
00495
00496
00497 void Block::fillBruhat()
00498 {
00499 using namespace bruhat;
00500 using namespace set;
00501
00502 if (d_state.test(BruhatConstructed))
00503 return;
00504
00505 try {
00506 std::vector<SetEltList> hd; makeHasse(hd,*this);
00507 BruhatOrder* bp = new BruhatOrder(hd);
00508
00509
00510 delete d_bruhat;
00511 d_bruhat = bp;
00512 d_state.set(BruhatConstructed);
00513 }
00514 catch (std::bad_alloc) {
00515 throw error::MemoryOverflow();
00516 }
00517 }
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562 weyl::TwistedInvolution Block::dualInvolution
00563 (const weyl::TwistedInvolution& tw,weyl::WeylInterface to_dual) const
00564 {
00565 const weyl::WeylGroup& W = weylGroup();
00566 return weyl::TwistedInvolution
00567 (W.translation(W.inverse(W.prod(W.longest(),W.twisted(tw.w()))),
00568 to_dual));
00569 }
00570
00571 }
00572
00573
00574
00575
00576
00577
00578
00579
00580 namespace blocks {
00581 namespace {
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606 weyl::WeylInterface
00607 correlation(const weyl::WeylGroup& W,const weyl::WeylGroup& dW)
00608 {
00609 size_t rank=W.rank();
00610 weyl::WeylInterface result(rank);
00611 for (size_t s = 0; s < rank; ++s)
00612 {
00613 weyl::WeylElt w=dW.generator(s);
00614 weyl::WeylWord ww=W.word(w);
00615 assert(ww.size()==1);
00616
00617
00618
00619
00620 result[s] = ww[0];
00621 }
00622 return result;
00623 }
00624
00625 descents::DescentStatus descents(kgb::KGBElt x,
00626 kgb::KGBElt y,
00627 const kgb::KGB& kgb,
00628 const kgb::KGB& dual_kgb)
00629 {
00630 using gradings::Status;
00631 using descents::DescentStatus;
00632
00633 DescentStatus result;
00634 for (size_t s = 0; s < kgb.rank(); ++s)
00635 if (kgb.status(s,x) == Status::Complex)
00636 if (kgb.isDescent(s,x))
00637 result.set(s,DescentStatus::ComplexDescent);
00638 else
00639 result.set(s,DescentStatus::ComplexAscent);
00640 else if (kgb.status(s,x) == Status::ImaginaryNoncompact)
00641 if (kgb.cross(s,x)!=x)
00642 result.set(s,DescentStatus::ImaginaryTypeI);
00643 else
00644 result.set(s,DescentStatus::ImaginaryTypeII);
00645 else if (dual_kgb.status(s,y) == Status::ImaginaryNoncompact)
00646 if (dual_kgb.cross(s,y)!=y)
00647 result.set(s,DescentStatus::RealTypeII);
00648 else
00649 result.set(s,DescentStatus::RealTypeI);
00650
00651 else if (kgb.status(s,x) == Status::Real)
00652 result.set(s,DescentStatus::RealNonparity);
00653 else
00654 result.set(s,DescentStatus::ImaginaryCompact);
00655
00656 return result;
00657 }
00658
00659
00660
00661
00662
00663
00664
00665 void insertAscents(std::set<BlockElt>& hs, const set::SetEltList& hr, size_t s,
00666 const Block& block)
00667 {
00668 using descents::DescentStatus;
00669
00670 for (size_t j = 0; j < hr.size(); ++j)
00671 {
00672 BlockElt z = hr[j];
00673 switch (block.descentValue(s,z))
00674 {
00675 case DescentStatus::ComplexAscent:
00676 hs.insert(block.cross(s,z));
00677 break;
00678 case DescentStatus::ImaginaryTypeI:
00679 hs.insert(block.cayley(s,z).first);
00680 break;
00681 case DescentStatus::ImaginaryTypeII:
00682 hs.insert(block.cayley(s,z).first);
00683 hs.insert(block.cayley(s,z).second);
00684 break;
00685 default:
00686 break;
00687 }
00688 }
00689 }
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701
00702 void makeHasse(std::vector<set::SetEltList>& Hasse, const Block& block)
00703 {
00704 using descents::DescentStatus;
00705
00706 Hasse.resize(block.size());
00707
00708 for (BlockElt z = 0; z < block.size(); ++z) {
00709
00710 std::set<BlockElt> h_z;
00711
00712 size_t s=block.firstStrictGoodDescent(z);
00713 if (s<block.rank())
00714 switch (block.descentValue(s,z))
00715 {
00716 default: assert(false); break;
00717 case DescentStatus::ComplexDescent:
00718 {
00719 BlockElt sz = block.cross(s,z);
00720 h_z.insert(sz);
00721 insertAscents(h_z,Hasse[sz],s,block);
00722 }
00723 break;
00724 case DescentStatus::RealTypeI:
00725 {
00726 BlockEltPair sz = block.inverseCayley(s,z);
00727 h_z.insert(sz.first);
00728 h_z.insert(sz.second);
00729 insertAscents(h_z,Hasse[sz.first],s,block);
00730 }
00731 }
00732 else
00733 for (size_t s = 0; s < block.rank(); ++s)
00734 if (block.descentValue(s,z)==DescentStatus::RealTypeII)
00735 h_z.insert(block.inverseCayley(s,z).first);
00736
00737 std::copy(h_z.begin(),h_z.end(),std::back_inserter(Hasse[z]));
00738 }
00739 }
00740
00741 }
00742
00743
00744
00745
00746
00747
00748
00749 std::vector<BlockElt> dual_map(const Block& b, const Block& dual_b)
00750 {
00751
00752 assert(b.size()==dual_b.size());
00753
00754 std::vector<BlockElt> result(b.size());
00755 for (BlockElt i=0; i<b.size(); ++i)
00756 result[i]=dual_b.element(b.y(i),b.x(i));
00757
00758 return result;
00759 }
00760
00761
00762 bitmap::BitMap common_Cartans(realredgp::RealReductiveGroup& GR,
00763 realredgp::RealReductiveGroup& dGR)
00764 {
00765 bitmap::BitMap result=GR.cartanSet();
00766 result &= GR.complexGroup().dualCartanSet(dGR.realForm());
00767
00768 return result;
00769 }
00770
00771 }
00772
00773 }