mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-12-26 02:30:29 +01:00
add tests for actions
This commit is contained in:
parent
2ef8de7d42
commit
e9bb6f13dd
@ -32,6 +32,18 @@
|
||||
# this should be very fast due to warmstarting:
|
||||
@test λ ≈ PropertyT.spectral_gap(sett) atol=1e-5
|
||||
@test PropertyT.check_property_T(sett) == true
|
||||
|
||||
##########
|
||||
# Symmetrizing by PermGroup(3):
|
||||
|
||||
sett = PropertyT.Settings("SL($N,Z)", G, S, PermGroup(N), with_SCS(4000, accel=20);
|
||||
upper_bound=0.27, warmstart=true)
|
||||
|
||||
PropertyT.print_summary(sett)
|
||||
|
||||
λ = PropertyT.spectral_gap(sett)
|
||||
@test λ > 0.269999
|
||||
@test PropertyT.interpret_results(sett, λ) == true
|
||||
end
|
||||
|
||||
@testset "oSL(4,Z)" begin
|
||||
|
104
test/actions.jl
Normal file
104
test/actions.jl
Normal file
@ -0,0 +1,104 @@
|
||||
@testset "actions on Group[Rings]" begin
|
||||
Eij = PropertyT.EltaryMat
|
||||
ssgs(M::MatAlgebra, i, j) = (S = [Eij(M, i, j), Eij(M, j, i)];
|
||||
S = unique([S; inv.(S)]); S)
|
||||
|
||||
rmul = Groups.rmul_autsymbol
|
||||
lmul = Groups.lmul_autsymbol
|
||||
|
||||
function ssgs(A::AutGroup, i, j)
|
||||
rmuls = [rmul(i,j), rmul(j,i)]
|
||||
lmuls = [lmul(i,j), lmul(j,i)]
|
||||
gen_set = A.([rmuls; lmuls])
|
||||
return unique([gen_set; inv.(gen_set)])
|
||||
end
|
||||
|
||||
@testset "actions on SL(3,Z) and its group ring" begin
|
||||
N = 3
|
||||
halfradius = 2
|
||||
M = MatrixAlgebra(zz, N)
|
||||
S = PropertyT.generating_set(M)
|
||||
E_R, sizes = Groups.generate_balls(S, one(M), radius=2halfradius);
|
||||
|
||||
rdict = GroupRings.reverse_dict(E_R)
|
||||
pm = GroupRings.create_pm(E_R, rdict, sizes[halfradius]; twisted=false);
|
||||
RG = GroupRing(M, E_R, rdict, pm)
|
||||
|
||||
@testset "correctness of actions" begin
|
||||
Δ = length(S)*RG(1) - sum(RG(s) for s in S)
|
||||
@test Δ == PropertyT.spLaplacian(RG, S)
|
||||
|
||||
elt = S[5]
|
||||
x = RG(1) - RG(elt)
|
||||
elt2 = E_R[rand(sizes[1]:sizes[2])]
|
||||
y = 2RG(elt2) - RG(elt)
|
||||
|
||||
for G in [PermGroup(N), WreathProduct(PermGroup(2), PermGroup(N))]
|
||||
@test all(g(one(M)) == one(M) for g in G)
|
||||
@test all(rdict[g(m)] <= sizes[1] for g in G for m in S)
|
||||
@test all(g(m)*g(n) == g(m*n) for g in G for m in S for n in S)
|
||||
|
||||
@test all(g(Δ) == Δ for g in G)
|
||||
@test all(g(x) == RG(1) - RG(g(elt)) for g in G)
|
||||
|
||||
@test all(2RG(g(elt2)) - RG(g(elt)) == g(y) for g in G)
|
||||
end
|
||||
end
|
||||
|
||||
@testset "small Laplacians" begin
|
||||
for (i,j) in PropertyT.indexing(N)
|
||||
Sij = ssgs(M, i,j)
|
||||
Δij= PropertyT.spLaplacian(RG, Sij)
|
||||
|
||||
@test all(p(Δij) == PropertyT.spLaplacian(RG, ssgs(M, p[i], p[j])) for p in PermGroup(N))
|
||||
|
||||
@test all(g(Δij) == PropertyT.spLaplacian(RG, ssgs(M, g.p[i], g.p[j])) for g in WreathProduct(PermGroup(2), PermGroup(N)))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@testset "actions on SAut(F_3) and its group ring" begin
|
||||
N = 3
|
||||
halfradius = 2
|
||||
M = SAut(FreeGroup(N))
|
||||
S = PropertyT.generating_set(M)
|
||||
E_R, sizes = Groups.generate_balls(S, one(M), radius=2halfradius);
|
||||
|
||||
rdict = GroupRings.reverse_dict(E_R)
|
||||
pm = GroupRings.create_pm(E_R, rdict, sizes[halfradius]; twisted=false);
|
||||
RG = GroupRing(M, E_R, rdict, pm)
|
||||
|
||||
|
||||
@testset "correctness of actions" begin
|
||||
|
||||
Δ = length(S)*RG(1) - sum(RG(s) for s in S)
|
||||
@test Δ == PropertyT.spLaplacian(RG, S)
|
||||
|
||||
elt = S[5]
|
||||
x = RG(1) - RG(elt)
|
||||
elt2 = E_R[rand(sizes[1]:sizes[2])]
|
||||
y = 2RG(elt2) - RG(elt)
|
||||
|
||||
for G in [PermGroup(N), WreathProduct(PermGroup(2), PermGroup(N))]
|
||||
@test all(g(one(M)) == one(M) for g in G)
|
||||
@test all(rdict[g(m)] <= sizes[1] for g in G for m in S)
|
||||
@test all(g(m)*g(n) == g(m*n) for g in G for m in S for n in S)
|
||||
|
||||
@test all(g(Δ) == Δ for g in G)
|
||||
@test all(g(x) == RG(1) - RG(g(elt)) for g in G)
|
||||
|
||||
@test all(2RG(g(elt2)) - RG(g(elt)) == g(y) for g in G)
|
||||
end
|
||||
end
|
||||
|
||||
for (i,j) in PropertyT.indexing(N)
|
||||
Sij = ssgs(M, i,j)
|
||||
Δij= PropertyT.spLaplacian(RG, Sij)
|
||||
|
||||
@test all(p(Δij) == PropertyT.spLaplacian(RG, ssgs(M, p[i], p[j])) for p in PermGroup(N))
|
||||
|
||||
@test all(g(Δij) == PropertyT.spLaplacian(RG, ssgs(M, g.p[i], g.p[j])) for g in WreathProduct(PermGroup(2), PermGroup(N)))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
@ -12,6 +12,7 @@ with_SCS(iters; accel=1, eps=1e-10) =
|
||||
acceleration_lookback=accel, eps=eps, warm_start=true)
|
||||
|
||||
include("1703.09680.jl")
|
||||
include("actions.jl")
|
||||
include("1712.07167.jl")
|
||||
include("SOS_correctness.jl")
|
||||
include("1812.03456.jl")
|
||||
|
Loading…
Reference in New Issue
Block a user