Skip to main content

RootSystem

Struct RootSystem 

Source
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

Source

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);
Source

pub fn rank(&self) -> usize

Rank of the Lie algebra.

Source

pub fn roots(&self) -> &[Root]

All roots (positive and negative).

Source

pub fn simple_roots(&self) -> &[Root]

Simple roots (basis for root system).

Source

pub fn cartan_matrix(&self) -> &[Vec<i32>]

Cartan matrix A_ij = ⟨α_j, α_i^∨⟩.

Source

pub fn num_roots(&self) -> usize

Number of roots.

Source

pub fn num_positive_roots(&self) -> usize

Number of positive roots.

Source

pub fn positive_roots(&self) -> Vec<Root>

Get all positive roots.

Source

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)
Source

pub fn contains_root(&self, root: &Root) -> bool

Check if a root is in the system.

Source

pub fn weyl_reflection(&self, alpha: &Root, beta: &Root) -> Root

Weyl reflection s_α for a root α.

Source

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)!

Source

pub fn dimension(&self) -> usize

Dimension of the Lie algebra: rank + num_roots.

For type Aₙ: dim = n + n(n+1) = n(n+2)

Source

pub fn is_dominant_weight(&self, weight: &Root) -> bool

Dominant weight chamber: λ such that ⟨λ, α⟩ ≥ 0 for all simple roots α.

Source

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_j expand 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

Source§

fn clone(&self) -> RootSystem

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RootSystem

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V