atlas  0.6
y_values.h
Go to the documentation of this file.
1 /*
2  This is y_values.h, for representing |y| components of module parameters
3
4  Copyright (C) 2011-2014 Marc van Leeuwen
5  part of the Atlas of Lie Groups and Representations
6
8 */
9
10 #ifndef Y_VALUES_H /* guard against multiple inclusions */
11 #define Y_VALUES_H
12
13 #include "../Atlas.h"
14
15 #include "ratvec.h" // containment
16
17 namespace atlas {
18
19 namespace y_values {
20
21
22 inline TorusElement exp_pi(const RatWeight& r);
23 inline TorusElement exp_2pi(const RatWeight& r);
24
25
26 /* The following classes are newer than |TitsElement|, |TitsGroup| and
27  |TitsCoset|, and less efficient, but provide a framework in which te sets
28  modelled by the latter classes can be fitted. They are actually used mostly
29  for handling |y| values (whence the name of this module), in which case one
30  has elements of the torus of the dual group. The terminology is adapted to
31  this point of view: we store a rational weight (rather than coweight).
32  */
33
34
35 /* An element of finite order in $H^$. This is like a rational vector in the
36  coordinates, taken modulo integers. Internally we store twice the numerator
37  of the rational vector, to facilitate adding halves to its coordinates.
38  */
40 {
41  RatWeight repr; // represents $\exp(\pi i repr)$, no factor 2!
42
44  : repr(r) {} // raw constructor, like exp(pi i r), but no modular reduction
45  public:
46  explicit TorusElement(size_t rank) : repr(rank) {} // identity torus element
47
48  // $\exp(\pi\ii r )$ or $\exp(2\pi\ii r )$
49  TorusElement(const RatWeight& r,bool two);
50
51  // accessors
52  size_t rank () const { return repr.size(); }
53
54  RatWeight log_pi(bool normalize) const; // return the stored rational vector
55  RatWeight log_2pi() const; // value halved: to be interpreted "mod Z^rank"
56
57  // more often it will be practical to have access to that "mod 2Z^rank" form
58  const RatWeight& as_Qmod2Z() const { return repr; }
59
60  bool operator== (const TorusElement& a) const { return repr==a.repr; }
61  bool operator!= (const TorusElement& a) const { return repr!=a.repr; }
62  bool operator< (const TorusElement& a) const { return repr<a.repr; }
63
64  TorusElement operator +(const TorusElement& t) const;
65  TorusElement operator -(const TorusElement& t) const;
66
68  { return *this= operator +(t); }
70  { return *this= operator -(t); }
71
72  // this method is to be used only at weights |alpha| taking value +1 or -1
73  bool negative_at(const Coweight& alpha) const
74  {
75  // the following asserts internally that |evaluate_at(alpha)| is integer
76  return repr.dot(alpha)%2!=0; // true if evaluates to odd integer
77  }
78
79  // evaluation giving rational number modulo 2, represented in interval [0,2)
80  Rational evaluate_at(const SmallBitVector& alpha) const;
81
82  // evaluation giving rational number modulo 2, represented in interval [0,2)
83  Rational evaluate_at(const Coweight& alpha) const;
84
85 // a method for rapidly doing imaginary cross action (for completing fiber)
86 // requires simple-imaginary |alpha| that is integral on |t| (however unless
87 // all roots are integral on |t|, these conditions might be contradictory!)
89  (const RootDatum& dual_rd, // dual for pragmatic reasons
90  RootNbr alpha) const; // any simple-imaginary root
91
92  // manipulators
93
94  TorusElement& operator+=(TorusPart v); // arg by value since it is small
95  TorusElement& reduce(); // reduce entires mod $2\Z$
96
97  void simple_reflect(const PreRootDatum& prd, weyl::Generator s);
98  void reflect(const RootDatum& rd, RootNbr alpha);
99  void act_by(const WeightInvolution& delta);
100
102  { symmetrise(delta,repr); return this->reduce(); }
104  { symmetrise(repr,delta); return this->reduce(); }
105 }; // |class TorusElement|
106
109
110 // a |y| value can be hashed as (fingerprint,InvolutionNbr) pair
111 struct y_entry
112 {
113  TorusElement t_rep; // a representative torus element, ignored in test
115  RatWeight fingerprint; // charcterizes the torus element
116
117  // obligatory fields for hashable entry
118  typedef std::vector<y_entry> Pooltype;
119  size_t hashCode(size_t modulus) const; // hash function
120  bool operator !=(const y_entry& y) const; // tests |nr| and |fingerprint|
121
123  : t_rep(t), nr(i), fingerprint(f) {}
124  const TorusElement& repr() const { return t_rep; }
125
126 }; // |struct y_entry|
127
128 // *** Functions ***
129
130 // whether each simple root has integral evaluation on a torus element
131 bool is_central(const WeightList& simple_roots, const TorusElement& e);
132
133 // For a $\xi$-stable torus element, find $\xi$-stable pre-image by $\exp_1$
135
136 } // |namespace y_values|
137
138 } // |namespace atlas|
139
140 #endif
Definition: y_values.h:39
TorusElement & operator-=(const TorusElement &t)
Definition: y_values.h:69
TorusElement(size_t rank)
Definition: y_values.h:46
unsigned int InvolutionNbr
Definition: Atlas.h:281
TorusElement exp_pi(const RatWeight &r)
Definition: y_values.h:107
TorusElement t_rep
Definition: y_values.h:113
BitVector< constants::RANK_MAX > SmallBitVector
Definition: Atlas.h:181
const TorusElement & repr() const
Definition: y_values.h:124
size_t rank() const
Definition: y_values.h:52
InvolutionNbr nr
Definition: y_values.h:114
TorusElement & left_symmetrise(const WeightInvolution &delta)
Definition: y_values.h:101
bool operator!=(const TorusElement &a) const
Definition: y_values.h:61
RatWeight log_pi(bool normalize) const
Definition: y_values.cpp:39
bool operator<(const TorusElement &a) const
Definition: y_values.h:62
RatCoweight stable_log(const TorusElement &t, CoweightInvolution xi)
Definition: y_values.cpp:168
bool operator==(const TorusElement &a) const
Definition: y_values.h:60
TorusElement operator-(const TorusElement &t) const
Definition: y_values.cpp:84
Rational evaluate_at(const SmallBitVector &alpha) const
Definition: y_values.cpp:54
bool negative_at(const Coweight &alpha) const
Definition: y_values.h:73
RationalVector< C2 > & symmetrise(const matrix::Matrix< C1 > &M, RationalVector< C2 > &v)
Definition: ratvec.h:136
TorusElement operator+(const TorusElement &t) const
Definition: y_values.cpp:73
TorusElement & reduce()
Definition: y_values.cpp:109
RatWeight repr
Definition: y_values.h:41
void reflect(const RootDatum &rd, RootNbr alpha)
Definition: y_values.cpp:123
TorusElement & operator+=(const TorusElement &t)
Definition: y_values.h:67
const RatWeight & as_Qmod2Z() const
Definition: y_values.h:58
RatWeight fingerprint
Definition: y_values.h:115
Definition: y_values.h:111
void act_by(const WeightInvolution &delta)
Definition: y_values.cpp:126
y_entry(const RatWeight &f, InvolutionNbr i, const TorusElement &t)
Definition: y_values.h:122
std::vector< Weight > WeightList
Definition: Atlas.h:162
C dot(const matrix::Vector< C1 > &w) const
Definition: ratvec.h:107
std::vector< y_entry > Pooltype
Definition: y_values.h:118
TorusElement(const RatWeight &r, tags::UnnormalizedTag)
Definition: y_values.h:43
size_t size() const
Definition: ratvec.h:56
TorusElement & right_symmetrise(const WeightInvolution &delta)
Definition: y_values.h:103
TorusElement simple_imaginary_cross(const RootDatum &dual_rd, RootNbr alpha) const
Definition: y_values.cpp:130
RatWeight log_2pi() const
Definition: y_values.cpp:46
Permutation normalize(const DynkinDiagram &d)
Definition: dynkin.cpp:386
Definition: Atlas.h:38
void simple_reflect(const PreRootDatum &prd, weyl::Generator s)
Definition: y_values.cpp:120
unsigned short RootNbr
Definition: Atlas.h:216
Dummy argument to distinguish two constructors for Partition.
Definition: tags.h:37
SmallBitVector TorusPart
Definition: Atlas.h:256
unsigned char Generator
Definition: Atlas.h:226
const expr & e
Definition: axis.cpp:95
Definition: common.h:36
TorusElement exp_2pi(const RatWeight &r)
Definition: y_values.h:108
bool is_central(const WeightList &alpha, const TorusElement &t)
Definition: y_values.cpp:154
ratvec::RationalVector< arithmetic::Numer_t > RatWeight
Definition: Atlas.h:156
Vertex v
Definition: graph.cpp:116