@@ -4,19 +4,89 @@ export LieGroup,
44 ×
55
66
7+ """
8+ ScalingLieGroup{F} <: AbstractGroup{Lie, F}
9+
10+ Represents a scaling Lie group. The group elements are diagonal matrices.
11+
12+ # Constructors
13+ ```julia
14+ ScalingLieGroup{F}(size::Int) where F
15+ ScalingLieGroup{F}(exps::Matrix{Int}) where F
16+ ```
17+
18+ # Examples
19+ ```jldoctest
20+ julia> ScalingLieGroup{ComplexF64}(5)
21+ ScalingLieGroup ℂˣ
22+ number type (or field): ComplexF64
23+ Lie algebra properties:
24+ dimension: 1
25+ basis (diagonal matrices):
26+ [1, 1, 1, 1, 1]
27+ ```
28+ ```jldoctest
29+ julia> exps = [1 1 1 0 0 0; 0 0 0 1 -2 0];
30+
31+ julia> ScalingLieGroup{ComplexF64}(exps)
32+ ScalingLieGroup (ℂˣ)²
33+ number type (or field): ComplexF64
34+ Lie algebra properties:
35+ dimension: 2
36+ basis (diagonal matrices):
37+ [1, 1, 1, 0, 0, 0]
38+ [0, 0, 0, 1, -2, 0]
39+ ```
40+ """
741struct ScalingLieGroup{F} <: AbstractGroup{Lie, F}
842 name:: String
943 algebra:: ScalingLieAlgebra{F}
1044end
1145
1246ScalingLieGroup{F}(size:: Int ) where F = ScalingLieGroup(" ℂˣ" , ScalingLieAlgebra{F}(size))
47+ function ScalingLieGroup{F}(exps:: Matrix{Int} ) where F
48+ name = size(exps, 1 ) == 1 ? " ℂˣ" : " (ℂˣ)$(superscript(size(exps, 1 ))) "
49+ ScalingLieGroup(name, ScalingLieAlgebra{F}(exps))
50+ end
1351
1452name(G:: ScalingLieGroup ) = G. name
1553algebra(G:: ScalingLieGroup ) = G. algebra
1654exponents(G:: ScalingLieGroup ) = exponents(algebra(G))
1755weight(G:: ScalingLieGroup , i:: Integer ) = Weight(Vector(exponents(G)[:, i]))
1856
57+ function Base. show(io:: IO , G:: ScalingLieGroup{F} ) where F
58+ println(io, " ScalingLieGroup $(name(G)) " )
59+ println(io, " number type (or field): $(F) " )
60+ println(io, " Lie algebra properties:" )
61+ println(io, " dimension: $(dim(algebra(G))) " )
62+ println(io, " basis (diagonal matrices):" )
63+ show_basis(io, algebra(G), offset= 3 )
64+ end
65+
66+
67+ """
68+ LieGroup{F} <: AbstractGroup{Lie, F}
69+
70+ Describes a matrix Lie group.
1971
72+ # Constructors
73+ ```julia
74+ LieGroup(type::String, size::Int)
75+ ```
76+
77+ Supported Lie group types: SO (special orthogonal).
78+
79+ # Examples
80+ ```jldoctest
81+ julia> SO3 = LieGroup("SO", 3)
82+ LieGroup SO(3)
83+ number type (or field): ComplexF64
84+ weight type: Int64
85+ Lie algebra properties:
86+ dimension: 3
87+ rank (dimension of Cartan subalgebra): 1
88+ ```
89+ """
2090struct LieGroup{F, T <: LieAlgebra{F} } <: AbstractGroup{Lie, F}
2191 name:: String
2292 algebra:: T
39109function Base. show(io:: IO , G:: LieGroup{F} ) where F
40110 println(io, " LieGroup $(name(G)) " )
41111 println(io, " number type (or field): $(F) " )
42- println(io, " Lie algebra:" )
43- show(io, algebra(G); offset = 2 )
112+ println(io, " weight type: $(weight_inner_type(algebra(G))) " )
113+ println(io, " Lie algebra properties:" )
114+ println(io, " dimension: $(dim(algebra(G))) " )
115+ print(io, " rank (dimension of Cartan subalgebra): $(rank(algebra(G))) " )
44116end
45117
46-
118+ """
119+ DirectProductGroup{T<:GroupType, F} <: AbstractDirectProductGroup{T, F}
120+
121+ Represents a direct product of groups.
122+ # Examples
123+ ```jldoctest
124+ julia> SO3 = LieGroup("SO", 3);
125+
126+ julia> T = ScalingLieGroup{ComplexF64}([1 2 3 4; -1 -2 -3 -4]);
127+
128+ julia> SO3 × SO3 × T
129+ DirectProductLieGroup SO(3) × SO(3) × (ℂˣ)²
130+ number type (or field): ComplexF64
131+ 3 factors: SO(3), SO(3), (ℂˣ)²
132+ Lie algebra:
133+ SumLieAlgebra 𝖘𝖔(3) ⊕ 𝖘𝖔(3) ⊕ ℂ²
134+ dimension: 8
135+ rank (dimension of Cartan subalgebra): 4
136+ ```
137+ """
47138struct DirectProductGroup{T<: GroupType , F, S<: AbstractGroup{T, F} } <: AbstractDirectProductGroup{T, F}
48139 name:: String
49140 groups:: Vector{S}
@@ -55,6 +146,7 @@ DirectProductGroup(
55146
56147name(G:: DirectProductGroup ) = G. name
57148groups(G:: DirectProductGroup ) = G. groups
149+ ngroups(G:: DirectProductGroup ) = length(groups(G))
58150algebra(G:: DirectProductGroup ) = SumLieAlgebra([algebra(Gᵢ) for Gᵢ in groups(G)])
59151× (
60152 G₁:: AbstractGroup{Lie, F} ,
@@ -65,13 +157,17 @@ algebra(G::DirectProductGroup) = SumLieAlgebra([algebra(Gᵢ) for Gᵢ in groups
65157 G₂:: AbstractGroup{Lie, F}
66158) where F = DirectProductGroup(" $(name(G₁)) × $(name(G₂)) " , vcat(groups(G₁), [G₂]))
67159
68- function Base. show(io:: IO , G:: DirectProductGroup{F} ) where F
160+ function Base. show(io:: IO , G:: DirectProductGroup{T, F} ) where {T, F}
69161 println(io, " DirectProductLieGroup $(name(G)) " )
70162 println(io, " number type (or field): $(F) " )
71- print(io, " Lie algebra:" )
163+ println(io, " $(ngroups(G)) factors: " , join([name(Gᵢ) for Gᵢ in groups(G)], " , " ))
164+ println(io, " Lie algebra:" )
165+ println(io, " SumLieAlgebra $(name(algebra(G))) " )
166+ println(io, " dimension: $(dim(algebra(G))) " )
167+ print(io, " rank (dimension of Cartan subalgebra): $(rank(algebra(G))) " )
72168end
73169
74-
170+ # TODO : remove and use DirectProductGroup instead with a Mixed group type
75171struct DirectProductMixedGroup{
76172 F, T <: AbstractGroup{Lie, F} , S <: AbstractGroup{Finite, F}
77173} <: AbstractDirectProductGroup{Mixed, F}
0 commit comments