1
0
mirror of https://github.com/kalmarek/SmallHyperbolic synced 2024-11-08 20:00:28 +01:00

compute eigenvalues of representations of PSL(2,109) (PEC supplied)

This commit is contained in:
kalmarek 2020-05-13 01:18:35 +02:00
parent 4f1995c1b9
commit ed6a987f70
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
6 changed files with 113 additions and 21 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
log
data/*rep*

View File

@ -299,11 +299,17 @@ git-tree-sha1 = "928b8ca9b2791081dc71a51c55347c27c618760f"
uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
version = "0.3.3" version = "0.3.3"
[[Nemo]]
deps = ["AbstractAlgebra", "BinaryProvider", "InteractiveUtils", "Libdl", "LinearAlgebra", "Markdown", "Random", "Test"]
git-tree-sha1 = "0db7e2b72bd67770d61ae2af18376a78d817816c"
uuid = "2edaba10-b0f1-5616-af89-8c11ac63239a"
version = "0.15.1"
[[OpenBLAS_jll]] [[OpenBLAS_jll]]
deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"] deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"]
git-tree-sha1 = "2ee3e636e94b9fd95fa8364d5cba2e20dae16609" git-tree-sha1 = "1887096f6897306a4662f7c5af936da7d5d1a062"
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.9+2" version = "0.3.9+4"
[[OpenSpecFun_jll]] [[OpenSpecFun_jll]]
deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"] deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"]

80
PSL.jl Normal file
View File

@ -0,0 +1,80 @@
using Nemo
using DelimitedFiles
include("src/nemo_utils.jl")
function parse_evalZ(arg, expr_str)
ex = Meta.parse(expr_str)
return @eval begin
let Z=$arg
$ex
end
end
end
function parse_evalzz(arg, expr_str)
ex = Meta.parse(expr_str)
return @eval begin
let zz=$arg
$ex
end
end
end
function load_discrete_repr(i, q=109; CC=AcbField(128))
ζ = root_of_unity(CC, (q+1)÷2)
degree = q-1
ra = readdlm("data/Discrete reps PSL(2, $q)/discrete_rep_$(i)_a.txt", ',', String)
a = matrix(CC, [CC(parse_evalZ(ζ, s)) for s in ra[1:degree, 1:degree]])
rb = readdlm("data/Discrete reps PSL(2, $q)/discrete_rep_$(i)_b.txt", ',', String)
b = matrix(CC, [CC(parse_evalZ(ζ, s)) for s in rb[1:degree, 1:degree]])
return a,b
end
function load_principal_repr(i, q=109; CC=AcbField(128))
ζ = root_of_unity(CC, (q+1)÷2)
degree = q+1
ra = readdlm("data/Principal reps PSL(2, $q)/principal_rep_$(i)_a.txt", ',', String)
a = matrix(CC, [CC(parse_evalzz(ζ, s)) for s in ra[1:degree, 1:degree]])
rb = readdlm("data/Principal reps PSL(2, $q)/principal_rep_$(i)_b.txt", ',', String)
b = matrix(CC, [CC(parse_evalzz(ζ, s)) for s in rb[1:degree, 1:degree]])
return a,b
end
# for i in 0:27
# try
# a,b = load_principal_repr(i)
# adjacency = sum([[a^i for i in 1:4]; [b^i for i in 1:4]])
# M = parent(adjacency)
#
# # X = M(rand(base_ring, size(adjacency)))
#
# # @time ev = eigvals(X*adjacency*inv(X))
# @time evc = eigvals(adjacency)
# ev = sort(real.(first.(evc)), lt=<, rev=true)
# @info "Principal Series Representation $i" ev[1:4]
# catch ex
# @error "Principal Series Representation $i : failed"
# ex isa InterruptException && throw(ex)
# end
# end
for i in 1:27
try
a,b = load_discrete_repr(i)
adjacency = sum([[a^i for i in 1:4]; [b^i for i in 1:4]])
@time evc = eigvals(adjacency)
ev = sort(real.(first.(evc)), lt=<, rev=true)
@info "Discrete Series Representation $i" ev[1:4]
catch ex
@error "Discrete Series Representation $i : failed"
ex isa InterruptException && rethrow(ex)
end
end

View File

@ -5,6 +5,7 @@ DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
GroupRings = "0befed6a-bd73-11e8-1e41-a1190947c2f5" GroupRings = "0befed6a-bd73-11e8-1e41-a1190947c2f5"
Groups = "5d8bd718-bd84-11e8-3b40-ad14f4a32557" Groups = "5d8bd718-bd84-11e8-3b40-ad14f4a32557"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Nemo = "2edaba10-b0f1-5616-af89-8c11ac63239a"
PropertyT = "03b72c93-0167-51e2-8a1e-eb4ff1fb940d" PropertyT = "03b72c93-0167-51e2-8a1e-eb4ff1fb940d"
RamanujanGraphs = "e7bd6bc6-b6b8-11e9-1ec2-2f89442c0d6c" RamanujanGraphs = "e7bd6bc6-b6b8-11e9-1ec2-2f89442c0d6c"
SCS = "c946c3f1-0d1f-5ce8-9dea-7daa1f7e2d13" SCS = "c946c3f1-0d1f-5ce8-9dea-7daa1f7e2d13"

View File

@ -1,19 +0,0 @@
using RamanujanGraphs
using RamanujanGraphs.LightGraphs
using Arpack
Γ, eigenvalues = let q = 109
a = RamanujanGraphs.PSL₂{q}([ 0 1
108 11])
b = RamanujanGraphs.PSL₂{q}([57 2
52 42])
S = unique([[a^i for i in 1:4]; [b^i for i in 1:4]])
@info "Generating set S of $(eltype(S))" S
@time Γ, verts, vlabels, elabels = RamanujanGraphs.cayley_graph((q^3 - q)÷2, S)
@assert all(degree(Γ,i) == length(S) for i in vertices(Γ))
A = adjacency_matrix(Γ)
@time eigenvalues, _ = eigs(A, nev=5)
@show Γ eigenvalues
end

22
src/nemo_utils.jl Normal file
View File

@ -0,0 +1,22 @@
import Base.reim
reim(x::Nemo.acb) = reim(convert(ComplexF64, x))
function root_of_unity(CC::AcbField, p, k=1)
@assert p > 0
res = zero(CC)
ccall((:acb_unit_root, Nemo.libarb), Cvoid, (Ref{acb}, Culong, Clong), res, p, prec(CC))
return res^k
end
import Base.adjoint
function Base.adjoint(m::acb_mat)
res = zero(m)
ccall((:acb_mat_conjugate_transpose, Nemo.libarb),
Cvoid, (Ref{acb_mat}, Ref{acb_mat}), res, m)
return res
end
using Random
import Base.rand
rand(rng::AbstractRNG, rs::Random.SamplerTrivial{AcbField}) = (CC = rs[]; CC(rand(Float64), rand(Float64)))