1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-19 07:20:28 +01:00

fix _positive_direction so that Adj works for N=2

This commit is contained in:
Marek Kaluba 2022-11-13 14:27:58 +01:00
parent aa9ccb882a
commit 65286e09d2
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
2 changed files with 24 additions and 4 deletions

View File

@ -48,10 +48,8 @@ function isorthogonal(α::AbstractRoot{N}, β::AbstractRoot{M}) where {N,M}
end end
function _positive_direction(α::Root{N}) where {N} function _positive_direction(α::Root{N}) where {N}
last = -1 / 2^(N - 1) v = α.coord + 1 / (N * 100) * rand(N)
return Root{N,Float64}( return Root{N,Float64}(v / norm(v, 2))
SVector(ntuple(i -> ifelse(i == N, last, (2)^-i), N)),
)
end end
function positive(roots::AbstractVector{<:Root{N}}) where {N} function positive(roots::AbstractVector{<:Root{N}}) where {N}

View File

@ -46,6 +46,28 @@
@testset "Symplectic group" begin @testset "Symplectic group" begin
@testset "Sp2()" begin
genus = 2
halfradius = 1
SpN = MatrixGroups.SymplecticGroup{2genus}(Int8)
RSpN, S_sp, sizes_sp = PropertyT.group_algebra(SpN, halfradius=halfradius, twisted=true)
Δ, Δs = let RG = RSpN, S = S_sp, ψ = identity
Δ = RG(length(S)) - sum(RG(s) for s in S)
Δs = PropertyT.laplacians(
RG,
S,
x -> (gx = PropertyT.grading(ψ(x)); Set([gx, -gx])),
)
Δ, Δs
end
sq = sum(Δᵢ^2 for Δᵢ in values(Δs))
@test PropertyT.Adj(Δs, :C₂) + sq == Δ^2
end
genus = 3 genus = 3
halfradius = 1 halfradius = 1