pub struct RootSystem { /* private fields */ }Expand description
A root system for a semisimple Lie algebra.
Encodes the structure of the Lie bracket through roots and Weyl reflections.
§Example
use lie_groups::RootSystem;
// SU(3) = type A₂
let su3 = RootSystem::type_a(2);
assert_eq!(su3.rank(), 2);
assert_eq!(su3.num_roots(), 6); // 3² - 1 = 8, but we store 6 roots
assert_eq!(su3.num_positive_roots(), 3);Implementations§
Source§impl RootSystem
impl RootSystem
Sourcepub fn type_a(n: usize) -> Self
pub fn type_a(n: usize) -> Self
Create a type Aₙ root system (SU(n+1)).
For SU(n+1), the rank is n, and roots are differences eᵢ - eⱼ for i ≠ j. Simple roots: αᵢ = eᵢ - eᵢ₊₁ for i = 1, …, n.
§Example
use lie_groups::RootSystem;
// SU(2) = A₁
let su2 = RootSystem::type_a(1);
assert_eq!(su2.rank(), 1);
assert_eq!(su2.num_roots(), 2); // ±α
// SU(3) = A₂
let su3 = RootSystem::type_a(2);
assert_eq!(su3.rank(), 2);
assert_eq!(su3.simple_roots().len(), 2);Sourcepub fn simple_roots(&self) -> &[Root]
pub fn simple_roots(&self) -> &[Root]
Simple roots (basis for root system).
Sourcepub fn cartan_matrix(&self) -> &[Vec<i32>]
pub fn cartan_matrix(&self) -> &[Vec<i32>]
Cartan matrix A_ij = ⟨α_j, α_i^∨⟩.
Sourcepub fn num_positive_roots(&self) -> usize
pub fn num_positive_roots(&self) -> usize
Number of positive roots.
Sourcepub fn positive_roots(&self) -> Vec<Root>
pub fn positive_roots(&self) -> Vec<Root>
Get all positive roots.
Sourcepub fn highest_root(&self) -> Root
pub fn highest_root(&self) -> Root
Get the highest root (longest root in the positive system).
The highest root θ is the unique positive root with maximal height (sum of coefficients when expanded in simple roots). It’s also the longest root in the root system for simply-laced types like Aₙ.
For type A_n (SU(n+1)), the highest root is θ = α₁ + α₂ + … + αₙ.
§Example
use lie_groups::RootSystem;
let su3 = RootSystem::type_a(2);
let theta = su3.highest_root();
// For SU(3), θ = α₁ + α₂ = (1, 0, -1)Sourcepub fn contains_root(&self, root: &Root) -> bool
pub fn contains_root(&self, root: &Root) -> bool
Check if a root is in the system.
Sourcepub fn weyl_reflection(&self, alpha: &Root, beta: &Root) -> Root
pub fn weyl_reflection(&self, alpha: &Root, beta: &Root) -> Root
Weyl reflection s_α for a root α.
Sourcepub fn weyl_orbit(&self, weight: &Root) -> Vec<Root>
pub fn weyl_orbit(&self, weight: &Root) -> Vec<Root>
Generate the Weyl group orbit of a weight under simple reflections.
The Weyl group is generated by reflections in simple roots. For type Aₙ, |W| = (n+1)!
Sourcepub fn dimension(&self) -> usize
pub fn dimension(&self) -> usize
Dimension of the Lie algebra: rank + num_roots.
For type Aₙ: dim = n + n(n+1) = n(n+2)
Sourcepub fn is_dominant_weight(&self, weight: &Root) -> bool
pub fn is_dominant_weight(&self, weight: &Root) -> bool
Dominant weight chamber: λ such that ⟨λ, α⟩ ≥ 0 for all simple roots α.
Sourcepub fn simple_root_expansion(&self, root: &Root) -> Option<Vec<i32>>
pub fn simple_root_expansion(&self, root: &Root) -> Option<Vec<i32>>
Express a root as a linear combination of simple roots.
Returns coefficients [c₁, c₂, …, cₙ] such that β = Σ cᵢ αᵢ. For roots in the system, coefficients are integers (positive for positive roots).
Returns None if the root is not in this system, or if the expansion
is not yet implemented for general root systems.
§Supported Systems
- Type A (SU(n+1)): Fully implemented. Roots
e_i - e_jexpand as sums of consecutive simple roots. - Other types: Returns
None. General expansion requires Cartan matrix inversion, which is not yet implemented.
Trait Implementations§
Source§impl Clone for RootSystem
impl Clone for RootSystem
Source§fn clone(&self) -> RootSystem
fn clone(&self) -> RootSystem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RootSystem
impl RefUnwindSafe for RootSystem
impl Send for RootSystem
impl Sync for RootSystem
impl Unpin for RootSystem
impl UnsafeUnpin for RootSystem
impl UnwindSafe for RootSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.