1
0
mirror of https://github.com/kalmarek/SmallHyperbolic synced 2024-11-27 16:35:26 +01:00

finally correct eigenvalues!

This commit is contained in:
kalmarek 2020-05-15 01:25:30 +02:00
parent 29244c5480
commit c62d59811f
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
2 changed files with 59 additions and 35 deletions

60
PSL.jl
View File

@ -1,5 +1,6 @@
using Nemo using Nemo
using DelimitedFiles using DelimitedFiles
using LinearAlgebra
include("src/nemo_utils.jl") include("src/nemo_utils.jl")
@ -27,13 +28,19 @@ function load_discrete_repr(i, q = 109; CC = AcbField(PRECISION))
ra = read_eval( ra = read_eval(
"data/Discrete reps PSL(2, $q)/discrete_rep_$(i)_a.txt", "data/Discrete reps PSL(2, $q)/discrete_rep_$(i)_a.txt",
:Z, ζ) :Z,
ζ,
)
a = matrix(CC, [CC(s) for s in ra[1:degree, 1:degree]]) a = matrix(CC, [CC(s) for s in ra[1:degree, 1:degree]])
rb = read_eval( rb = read_eval(
"data/Discrete reps PSL(2, $q)/discrete_rep_$(i)_b.txt", "data/Discrete reps PSL(2, $q)/discrete_rep_$(i)_b.txt",
:Z, ζ) :Z,
ζ,
)
b = matrix(CC, [CC(s) for s in rb[1:degree, 1:degree]]) b = matrix(CC, [CC(s) for s in rb[1:degree, 1:degree]])
@assert contains(det(a), 1)
@assert contains(det(b), 1)
return a, b return a, b
end end
@ -44,46 +51,61 @@ function load_principal_repr(i, q = 109; CC = AcbField(PRECISION))
ra = read_eval( ra = read_eval(
"data/Principal reps PSL(2, $q)/principal_rep_$(i)_a.txt", "data/Principal reps PSL(2, $q)/principal_rep_$(i)_a.txt",
:zz, ζ) :zz,
ζ,
)
a = matrix(CC, [CC(z) for z in ra[1:degree, 1:degree]]) a = matrix(CC, [CC(z) for z in ra[1:degree, 1:degree]])
rb = read_eval( rb = read_eval(
"data/Principal reps PSL(2, $q)/principal_rep_$(i)_b.txt", "data/Principal reps PSL(2, $q)/principal_rep_$(i)_b.txt",
:zz, ζ) :zz,
ζ,
)
b = matrix(CC, [CC(z) for z in rb[1:degree, 1:degree]])
@assert contains(det(a), 1)
@assert contains(det(b), 1)
return a, b return a, b
end end
function safe_eigvals(m::acb_mat) function safe_eigvals(m::acb_mat)
evs = eigvals(m)
all(isfinite.(evs)) && return evs
CC = base_ring(m) CC = base_ring(m)
X = matrix(CC, rand(CC, size(m))) X = matrix(CC, rand(CC, size(m)))
return eigvals(X * m * inv(X)) evs = eigvals(X * m * inv(X))
all(isfinite.(evs)) && return evs
throw(ArgumentError("Could not compute eigenvalues"))
end end
for i in 0:27 if !isinteractive()
for i = 0:27
try try
a, b = load_principal_repr(i) a, b = load_principal_repr(i)
adjacency = sum([[a^i for i in 1:4]; [b^i for i in 1:4]]) adjacency = sum(a^i for i = 1:4) + sum(b^i for i = 1:4)
@time evc = safe_eigvals(adjacency) @time ev = let evs = safe_eigvals(adjacency)
ev = sort(real.(first.(evc)), lt=<, rev=true) _count_multiplicites(evs)
@info "Principal Series Representation $i" ev[1:2] end
@info "Principal Series Representation $i" ev[1:2] ev[end]
catch ex catch ex
@error "Principal Series Representation $i failed" @error "Principal Series Representation $i failed" ex
ex isa InterruptException && throw(ex) ex isa InterruptException && throw(ex)
end end
end end
for i in 1:27 for i = 1:27
try try
a, b = load_discrete_repr(i) a, b = load_discrete_repr(i)
adjacency = sum([[a^i for i in 1:4]; [b^i for i in 1:4]]) adjacency = sum(a^i for i = 1:4) + sum(b^i for i = 1:4)
@time evc = eigvals(adjacency) @time ev = let evs = safe_eigvals(adjacency)
ev = sort(real.(first.(evc)), lt=<, rev=true) _count_multiplicites(evs)
@info "Discrete Series Representation $i" ev[1:2] end
@info "Discrete Series Representation $i" ev[1:2] ev[end]
catch ex catch ex
@error "Discrete Series Representation $i : failed" @error "Discrete Series Representation $i : failed" ex
ex isa InterruptException && rethrow(ex) ex isa InterruptException && rethrow(ex)
end end
end end
end

View File

@ -1,3 +1,5 @@
Base.hash(a::acb, h::UInt) = h
import Base.reim import Base.reim
reim(x::Nemo.acb) = reim(convert(ComplexF64, x)) reim(x::Nemo.acb) = reim(convert(ComplexF64, x))
@ -153,5 +155,5 @@ function _count_multiplicites(evs)
push!(λ_m, (evs[i], m)) push!(λ_m, (evs[i], m))
i += m i += m
end end
return λ_m return sort(λ_m, lt=(a,b)->(real(first(a))<real(first(b))), rev=true)
end end