test: old sq,adj,op = the graded Adj for SL/SAut

This commit is contained in:
Marek Kaluba 2022-11-08 11:49:04 +01:00
parent b2b08e68c1
commit 4e93e78a9b
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
3 changed files with 80 additions and 39 deletions

View File

@ -25,7 +25,6 @@ end
grading(s::MatrixGroups.ElementarySymplectic) = Roots.Root(s)
grading(e::MatrixGroups.ElementaryMatrix) = Roots.Root(e)
grading(t::Groups.Transvection) = grading(Groups._abelianize(t))
function grading(g::FPGroupElement)
if length(word(g)) == 1

View File

@ -60,10 +60,7 @@ function positive(roots::AbstractVector{<:Root{N}}) where {N}
return filter(α -> dot(α, pd) > 0.0, roots)
end
Base.:~(α::AbstractRoot, β::AbstractRoot) = isproportional(α, β)
(α::AbstractRoot, β::AbstractRoot) = isorthogonal(α, β)
function Base.show(io::IO, r::Root{N}) where {N}
function Base.show(io::IO, r::Root)
print(io, "Root$(r.coord)")
end
@ -73,8 +70,7 @@ function Base.show(io::IO, ::MIME"text/plain", r::Root{N}) where {N}
print(io, "Root in ^$N of length $l\n", r.coord)
end
E(N, i::Integer) = Root(ntuple(k -> k == i ? 1 : 0, N))
𝕖(N, i) = E(N, i)
𝕖(N, i) = Root(ntuple(k -> k == i ? 1 : 0, N))
𝕆(N, ::Type{T}) where {T} = Root(ntuple(_ -> zero(T), N))
"""

View File

@ -1,40 +1,86 @@
@testset "Adj for SpN via grading" begin
@testset "Adj via grading" begin
genus = 3
halfradius = 2
@testset "SL(n,Z) & Aut(F₄)" begin
n = 4
halfradius = 1
SL = MatrixGroups.SpecialLinearGroup{n}(Int8)
RSL, S, sizes = PropertyT.group_algebra(SL, halfradius=halfradius, twisted=true)
SpN = MatrixGroups.SymplecticGroup{2genus}(Int8)
Δ = RSL(length(S)) - sum(RSL(s) for s in S)
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
@testset "Adj correctness: genus=$genus" begin
all_subtypes = (
:A₁, :C₁, Symbol("A₁×A₁"), Symbol("C₁×C₁"), Symbol("A₁×C₁"), :A₂, :C₂
)
@test PropertyT.Adj(Δs, :A₂)[one(SpN)] == 384
@test iszero(PropertyT.Adj(Δs, Symbol("A₁×A₁")))
@test iszero(PropertyT.Adj(Δs, Symbol("C₁×C₁")))
@testset "divisibility by 16" begin
for subtype in all_subtypes
subtype in (:A₁, :C₁) && continue
@test isinteger(PropertyT.Adj(Δs, subtype)[one(SpN)] / 16)
end
Δs = let ψ = identity
PropertyT.laplacians(
RSL,
S,
x -> (gx = PropertyT.grading(ψ(x)); Set([gx, -gx])),
)
end
@test sum(PropertyT.Adj(Δs, subtype) for subtype in all_subtypes) == Δ^2
sq, adj, op = PropertyT.SqAdjOp(RSL, n)
@test PropertyT.Adj(Δs, :A₁) == sq
@test PropertyT.Adj(Δs, :A₂) == adj
@test PropertyT.Adj(Δs, Symbol("A₁×A₁")) == op
halfradius = 1
G = SpecialAutomorphismGroup(FreeGroup(n))
RG, S, sizes = PropertyT.group_algebra(G, halfradius=halfradius, twisted=true)
Δ = RG(length(S)) - sum(RG(s) for s in S)
Δs = let ψ = Groups.Homomorphism(Groups._abelianize, G, SL)
PropertyT.laplacians(
RG,
S,
x -> (gx = PropertyT.grading(ψ(x)); Set([gx, -gx])),
)
end
sq, adj, op = PropertyT.SqAdjOp(RG, n)
@test PropertyT.Adj(Δs, :A₁) == sq
@test PropertyT.Adj(Δs, :A₂) == adj
@test PropertyT.Adj(Δs, Symbol("A₁×A₁")) == op
end
@testset "Symplectic group" begin
genus = 3
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
@testset "Adj correctness: genus=$genus" begin
all_subtypes = (
:A₁, :C₁, Symbol("A₁×A₁"), Symbol("C₁×C₁"), Symbol("A₁×C₁"), :A₂, :C₂
)
@test PropertyT.Adj(Δs, :A₂)[one(SpN)] == 384
@test iszero(PropertyT.Adj(Δs, Symbol("A₁×A₁")))
@test iszero(PropertyT.Adj(Δs, Symbol("C₁×C₁")))
@testset "divisibility by 16" begin
for subtype in all_subtypes
subtype in (:A₁, :C₁) && continue
@test isinteger(PropertyT.Adj(Δs, subtype)[one(SpN)] / 16)
end
end
@test sum(PropertyT.Adj(Δs, subtype) for subtype in all_subtypes) == Δ^2
end
end
end