mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-21 23:55:28 +01:00
Merge a05a0798ec
into f4936dd50a
This commit is contained in:
commit
cb6c97a28d
@ -112,7 +112,7 @@ function certify_solution(
|
|||||||
!augmented && StarAlgebras.aug(elt) == StarAlgebras.aug(orderunit) == 0
|
!augmented && StarAlgebras.aug(elt) == StarAlgebras.aug(orderunit) == 0
|
||||||
|
|
||||||
Q = should_we_augment ? augment_columns!(Q) : Q
|
Q = should_we_augment ? augment_columns!(Q) : Q
|
||||||
@time sos = compute_sos(parent(elt), Q; augmented = augmented)
|
sos = compute_sos(parent(elt), Q; augmented = augmented)
|
||||||
|
|
||||||
@info "Checking in $(eltype(sos)) arithmetic with" λ
|
@info "Checking in $(eltype(sos)) arithmetic with" λ
|
||||||
|
|
||||||
@ -123,11 +123,9 @@ function certify_solution(
|
|||||||
end
|
end
|
||||||
|
|
||||||
λ_int = IntervalArithmetic.@interval(λ)
|
λ_int = IntervalArithmetic.@interval(λ)
|
||||||
Q_int = IntervalMatrices.IntervalMatrix([
|
Q_int = IntervalMatrices.IntervalMatrix(IntervalArithmetic.Interval.(Q))
|
||||||
IntervalArithmetic.@interval(q) for q in Q
|
|
||||||
])
|
|
||||||
|
|
||||||
check, sos_int = @time if should_we_augment
|
check, sos_int = if should_we_augment
|
||||||
@info("Projecting columns of Q to the augmentation ideal...")
|
@info("Projecting columns of Q to the augmentation ideal...")
|
||||||
Q_int = augment_columns!(Q_int)
|
Q_int = augment_columns!(Q_int)
|
||||||
@info "Checking that sum of every column contains 0.0..."
|
@info "Checking that sum of every column contains 0.0..."
|
||||||
|
@ -156,12 +156,8 @@ function constraints(
|
|||||||
mstr::StarAlgebras.MultiplicativeStructure;
|
mstr::StarAlgebras.MultiplicativeStructure;
|
||||||
augmented = false,
|
augmented = false,
|
||||||
)
|
)
|
||||||
cnstrs = _constraints(
|
id = basis[one(first(basis))]
|
||||||
mstr;
|
cnstrs = _constraints(mstr; augmented = augmented, id = mstr[id, id])
|
||||||
augmented = augmented,
|
|
||||||
num_constraints = length(basis),
|
|
||||||
id = basis[one(first(basis))],
|
|
||||||
)
|
|
||||||
|
|
||||||
return Dict(
|
return Dict(
|
||||||
basis[i] => ConstraintMatrix(c, size(mstr)..., 1) for
|
basis[i] => ConstraintMatrix(c, size(mstr)..., 1) for
|
||||||
@ -172,11 +168,11 @@ end
|
|||||||
function _constraints(
|
function _constraints(
|
||||||
mstr::StarAlgebras.MultiplicativeStructure;
|
mstr::StarAlgebras.MultiplicativeStructure;
|
||||||
augmented::Bool = false,
|
augmented::Bool = false,
|
||||||
num_constraints = maximum(mstr),
|
|
||||||
id,
|
id,
|
||||||
)
|
)
|
||||||
cnstrs = [signed(eltype(mstr))[] for _ in 1:num_constraints]
|
cnstrs = [signed(eltype(mstr))[] for _ in 1:maximum(mstr)]
|
||||||
LI = LinearIndices(size(mstr))
|
LI = LinearIndices(size(mstr))
|
||||||
|
id_ = mstr[id, id]
|
||||||
|
|
||||||
for ci in CartesianIndices(size(mstr))
|
for ci in CartesianIndices(size(mstr))
|
||||||
k = LI[ci]
|
k = LI[ci]
|
||||||
@ -185,8 +181,8 @@ function _constraints(
|
|||||||
push!(cnstrs[a_star_b], k)
|
push!(cnstrs[a_star_b], k)
|
||||||
if augmented
|
if augmented
|
||||||
# (1-a)'(1-b) = 1 - a' - b + a'b
|
# (1-a)'(1-b) = 1 - a' - b + a'b
|
||||||
push!(cnstrs[id], k)
|
push!(cnstrs[id_], k)
|
||||||
a_star, b = mstr[-i, id], j
|
a_star, b = mstr[-i, id], mstr[j, id]
|
||||||
push!(cnstrs[a_star], -k)
|
push!(cnstrs[a_star], -k)
|
||||||
push!(cnstrs[b], -k)
|
push!(cnstrs[b], -k)
|
||||||
end
|
end
|
||||||
|
@ -67,13 +67,3 @@ function Sq(rootsystem::AbstractDict)
|
|||||||
init = zero(first(values(rootsystem))),
|
init = zero(first(values(rootsystem))),
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
function level(rootsystem, level::Integer)
|
|
||||||
1 ≤ level ≤ 4 || throw("level is implemented only for i ∈{1,2,3,4}")
|
|
||||||
level == 1 && return Adj(rootsystem, :C₁) # always positive
|
|
||||||
level == 2 && return Adj(rootsystem, :A₁) +
|
|
||||||
Adj(rootsystem, Symbol("C₁×C₁")) +
|
|
||||||
Adj(rootsystem, :C₂) # C₂ is not positive
|
|
||||||
level == 3 && return Adj(rootsystem, :A₂) + Adj(rootsystem, Symbol("A₁×C₁"))
|
|
||||||
level == 4 && return Adj(rootsystem, Symbol("A₁×A₁")) # positive
|
|
||||||
end
|
|
||||||
|
@ -8,7 +8,8 @@ function countmap(f, v)
|
|||||||
return counts
|
return counts
|
||||||
end
|
end
|
||||||
|
|
||||||
@testset "classify_root_system" begin
|
@testset "Chevalley" begin
|
||||||
|
@testset "classify_root_system" begin
|
||||||
α = PropertyT.Roots.Root([1, -1, 0])
|
α = PropertyT.Roots.Root([1, -1, 0])
|
||||||
β = PropertyT.Roots.Root([0, 1, -1])
|
β = PropertyT.Roots.Root([0, 1, -1])
|
||||||
γ = PropertyT.Roots.Root([2, 0, 0])
|
γ = PropertyT.Roots.Root([2, 0, 0])
|
||||||
@ -17,11 +18,15 @@ end
|
|||||||
@test PropertyT.Roots.classify_root_system(α, γ, (false, true)) == :C₂
|
@test PropertyT.Roots.classify_root_system(α, γ, (false, true)) == :C₂
|
||||||
@test PropertyT.Roots.classify_root_system(β, γ, (false, true)) ==
|
@test PropertyT.Roots.classify_root_system(β, γ, (false, true)) ==
|
||||||
Symbol("A₁×C₁")
|
Symbol("A₁×C₁")
|
||||||
end
|
end
|
||||||
|
|
||||||
@testset "Exceptional root systems" begin
|
@testset "Exceptional root systems" begin
|
||||||
@testset "F4" begin
|
@testset "F4" begin
|
||||||
F4 = let Σ = PermutationGroups.PermGroup(perm"(1,2,3,4)", perm"(1,2)")
|
F4 =
|
||||||
|
let Σ = PermutationGroups.PermGroup(
|
||||||
|
perm"(1,2,3,4)",
|
||||||
|
perm"(1,2)",
|
||||||
|
)
|
||||||
long = let x = (1, 1, 0, 0) .// 1
|
long = let x = (1, 1, 0, 0) .// 1
|
||||||
PropertyT.Roots.Root.(
|
PropertyT.Roots.Root.(
|
||||||
union(
|
union(
|
||||||
@ -54,9 +59,11 @@ end
|
|||||||
@test isapprox(PropertyT.Roots.ℓ₂length(b), sqrt(2))
|
@test isapprox(PropertyT.Roots.ℓ₂length(b), sqrt(2))
|
||||||
c = a + b
|
c = a + b
|
||||||
@test isapprox(PropertyT.Roots.ℓ₂length(c), 2.0)
|
@test isapprox(PropertyT.Roots.ℓ₂length(c), 2.0)
|
||||||
@test PropertyT.Roots.classify_root_system(b, c, (false, true)) == :C₂
|
@test PropertyT.Roots.classify_root_system(b, c, (false, true)) ==
|
||||||
|
:C₂
|
||||||
|
|
||||||
long = F4[findfirst(r -> PropertyT.Roots.ℓ₂length(r) == sqrt(2), F4)]
|
long =
|
||||||
|
F4[findfirst(r -> PropertyT.Roots.ℓ₂length(r) == sqrt(2), F4)]
|
||||||
short = F4[findfirst(r -> PropertyT.Roots.ℓ₂length(r) == 1.0, F4)]
|
short = F4[findfirst(r -> PropertyT.Roots.ℓ₂length(r) == 1.0, F4)]
|
||||||
|
|
||||||
subtypes = Set([:C₂, :A₂, Symbol("A₁×C₁")])
|
subtypes = Set([:C₂, :A₂, Symbol("A₁×C₁")])
|
||||||
@ -105,11 +112,14 @@ end
|
|||||||
end
|
end
|
||||||
|
|
||||||
signs = collect(
|
signs = collect(
|
||||||
p for p in Iterators.product(fill([-1, +1], 8)...) if
|
p for
|
||||||
|
p in Iterators.product(fill([-1, +1], 8)...) if
|
||||||
iseven(count(==(-1), p))
|
iseven(count(==(-1), p))
|
||||||
)
|
)
|
||||||
halfs = let x = (1, 1, 1, 1, 1, 1, 1, 1) .// 2
|
halfs = let x = (1, 1, 1, 1, 1, 1, 1, 1) .// 2
|
||||||
rts = unique(PropertyT.Roots.Root(x .* sgn) for sgn in signs)
|
rts = unique(
|
||||||
|
PropertyT.Roots.Root(x .* sgn) for sgn in signs
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
union(long, halfs)
|
union(long, halfs)
|
||||||
@ -123,8 +133,8 @@ end
|
|||||||
|
|
||||||
let Ω = E8, α = first(Ω)
|
let Ω = E8, α = first(Ω)
|
||||||
counts = countmap([
|
counts = countmap([
|
||||||
PropertyT.Roots.classify_sub_root_system(Ω, α, γ) for
|
PropertyT.Roots.classify_sub_root_system(Ω, α, γ)
|
||||||
γ in Ω if !PropertyT.Roots.isproportional(α, γ)
|
for γ in Ω if !PropertyT.Roots.isproportional(α, γ)
|
||||||
])
|
])
|
||||||
@test Set(keys(counts)) == subtypes
|
@test Set(keys(counts)) == subtypes
|
||||||
d, r = divrem(counts[:A₂], 4)
|
d, r = divrem(counts[:A₂], 4)
|
||||||
@ -137,8 +147,8 @@ end
|
|||||||
|
|
||||||
let Ω = E7, α = first(Ω)
|
let Ω = E7, α = first(Ω)
|
||||||
counts = countmap([
|
counts = countmap([
|
||||||
PropertyT.Roots.classify_sub_root_system(Ω, α, γ) for
|
PropertyT.Roots.classify_sub_root_system(Ω, α, γ)
|
||||||
γ in Ω if !PropertyT.Roots.isproportional(α, γ)
|
for γ in Ω if !PropertyT.Roots.isproportional(α, γ)
|
||||||
])
|
])
|
||||||
@test Set(keys(counts)) == subtypes
|
@test Set(keys(counts)) == subtypes
|
||||||
d, r = divrem(counts[:A₂], 4)
|
d, r = divrem(counts[:A₂], 4)
|
||||||
@ -155,8 +165,8 @@ end
|
|||||||
|
|
||||||
let Ω = E6, α = first(Ω)
|
let Ω = E6, α = first(Ω)
|
||||||
counts = countmap([
|
counts = countmap([
|
||||||
PropertyT.Roots.classify_sub_root_system(Ω, α, γ) for
|
PropertyT.Roots.classify_sub_root_system(Ω, α, γ)
|
||||||
γ in Ω if !PropertyT.Roots.isproportional(α, γ)
|
for γ in Ω if !PropertyT.Roots.isproportional(α, γ)
|
||||||
])
|
])
|
||||||
@test Set(keys(counts)) == subtypes
|
@test Set(keys(counts)) == subtypes
|
||||||
d, r = divrem(counts[:A₂], 4)
|
d, r = divrem(counts[:A₂], 4)
|
||||||
@ -165,4 +175,135 @@ end
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@testset "Levels in Sp2n" begin
|
||||||
|
function level(rootsystem, level::Integer)
|
||||||
|
1 ≤ level ≤ 4 || throw("level is implemented only for i ∈{1,2,3,4}")
|
||||||
|
level == 1 && return PropertyT.Adj(rootsystem, :C₁) # always positive
|
||||||
|
level == 2 && return PropertyT.Adj(rootsystem, :A₁) +
|
||||||
|
PropertyT.Adj(rootsystem, Symbol("C₁×C₁")) +
|
||||||
|
PropertyT.Adj(rootsystem, :C₂) # C₂ is not positive
|
||||||
|
level == 3 && return PropertyT.Adj(rootsystem, :A₂) +
|
||||||
|
PropertyT.Adj(rootsystem, Symbol("A₁×C₁"))
|
||||||
|
level == 4 && return PropertyT.Adj(rootsystem, Symbol("A₁×A₁")) # positive
|
||||||
|
end
|
||||||
|
|
||||||
|
n = 5
|
||||||
|
G = MatrixGroups.SymplecticGroup{2n}(Int8)
|
||||||
|
RG, S, sizes = PropertyT.group_algebra(G; halfradius = 1)
|
||||||
|
|
||||||
|
Weyl = let N = n
|
||||||
|
P = PermGroup(perm"(1,2)", Perm(circshift(1:N, -1)))
|
||||||
|
Groups.Constructions.WreathProduct(PermGroup(perm"(1,2)"), P)
|
||||||
|
end
|
||||||
|
act = PropertyT.action_by_conjugation(G, Weyl)
|
||||||
|
|
||||||
|
function ^ᵃ(x, w::Groups.Constructions.WreathProductElement)
|
||||||
|
return SymbolicWedderburn.action(act, w, x)
|
||||||
|
end
|
||||||
|
|
||||||
|
Sₙ = S
|
||||||
|
Δsₙ = PropertyT.laplacians(
|
||||||
|
RG,
|
||||||
|
Sₙ,
|
||||||
|
x -> (gx = PropertyT.grading(x); Set([gx, -gx])),
|
||||||
|
)
|
||||||
|
|
||||||
|
function natural_embedding(i, Sp2m, Sp2n)
|
||||||
|
_dim(::MatrixGroups.ElementarySymplectic{N}) where {N} = N
|
||||||
|
n = _dim(first(alphabet(Sp2n))) ÷ 2
|
||||||
|
m = _dim(first(alphabet(Sp2m))) ÷ 2
|
||||||
|
l = alphabet(Sp2m)[i]
|
||||||
|
i, j = if l.symbol === :A
|
||||||
|
l.i, l.j
|
||||||
|
elseif l.symbol === :B
|
||||||
|
ifelse(l.i ≤ m, (l.i, l.j - m + n), (l.i - m + n, l.j))
|
||||||
|
else
|
||||||
|
throw("unknown type: $(l.symbol)")
|
||||||
|
end
|
||||||
|
image_of_l =
|
||||||
|
MatrixGroups.ElementarySymplectic{2n}(l.symbol, i, j, l.val)
|
||||||
|
return Groups.word_type(Sp2n)([alphabet(Sp2n)[image_of_l]])
|
||||||
|
end
|
||||||
|
|
||||||
|
@testset "Sp4 ↪ Sp12" begin
|
||||||
|
m = 2
|
||||||
|
Sₘ = let m = m, Sp2n = G
|
||||||
|
Sp2m = MatrixGroups.SymplecticGroup{2m}(Int8)
|
||||||
|
h = Groups.Homomorphism(
|
||||||
|
natural_embedding,
|
||||||
|
Sp2m,
|
||||||
|
Sp2n;
|
||||||
|
check = false,
|
||||||
|
)
|
||||||
|
S = h.(gens(Sp2m))
|
||||||
|
S = union!(S, inv.(S))
|
||||||
|
end
|
||||||
|
|
||||||
|
Δsₘ = PropertyT.laplacians(
|
||||||
|
RG,
|
||||||
|
Sₘ,
|
||||||
|
x -> (gx = PropertyT.grading(x); Set([gx, -gx])),
|
||||||
|
)
|
||||||
|
|
||||||
|
function k(n, m, i)
|
||||||
|
return 2^n * factorial(m) * factorial(n - i) ÷ factorial(m - i)
|
||||||
|
end
|
||||||
|
|
||||||
|
@testset "Level $i" for i in 1:4
|
||||||
|
Levᵢᵐ = level(Δsₘ, i)
|
||||||
|
Levᵢⁿ = level(Δsₙ, i)
|
||||||
|
|
||||||
|
if 1 ≤ i ≤ 2
|
||||||
|
@test !iszero(Levᵢᵐ)
|
||||||
|
@time Σ_W_Levᵢᵐ = sum(Levᵢᵐ^ᵃw for w in Weyl)
|
||||||
|
|
||||||
|
@test isinteger(Σ_W_Levᵢᵐ[one(G)] / Levᵢⁿ[one(G)])
|
||||||
|
@test Σ_W_Levᵢᵐ[one(G)] / Levᵢⁿ[one(G)] == k(n, m, i)
|
||||||
|
@test Σ_W_Levᵢᵐ == k(n, m, i) * Levᵢⁿ
|
||||||
|
else
|
||||||
|
@test iszero(Levᵢᵐ)
|
||||||
|
@test !iszero(Levᵢⁿ)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@testset "Sp8 ↪ Sp12" begin
|
||||||
|
m = 4
|
||||||
|
Sₘ = let m = m, Sp2n = G
|
||||||
|
Sp2m = MatrixGroups.SymplecticGroup{2m}(Int8)
|
||||||
|
h = Groups.Homomorphism(
|
||||||
|
natural_embedding,
|
||||||
|
Sp2m,
|
||||||
|
Sp2n;
|
||||||
|
check = false,
|
||||||
|
)
|
||||||
|
S = h.(gens(Sp2m))
|
||||||
|
S = union!(S, inv.(S))
|
||||||
|
end
|
||||||
|
|
||||||
|
Δsₘ = PropertyT.laplacians(
|
||||||
|
RG,
|
||||||
|
Sₘ,
|
||||||
|
x -> (gx = PropertyT.grading(x); Set([gx, -gx])),
|
||||||
|
)
|
||||||
|
|
||||||
|
function k(n, m, i)
|
||||||
|
return 2^n * factorial(m) * factorial(n - i) ÷ factorial(m - i)
|
||||||
|
end
|
||||||
|
|
||||||
|
@testset "Level $i" for i in 1:4
|
||||||
|
Levᵢᵐ = level(Δsₘ, i)
|
||||||
|
Levᵢⁿ = level(Δsₙ, i)
|
||||||
|
|
||||||
|
@test !iszero(Levᵢᵐ)
|
||||||
|
@time Σ_W_Levᵢᵐ = sum(Levᵢᵐ^ᵃw for w in Weyl)
|
||||||
|
|
||||||
|
@test isinteger(Σ_W_Levᵢᵐ[one(G)] / Levᵢⁿ[one(G)])
|
||||||
|
@test Σ_W_Levᵢᵐ[one(G)] / Levᵢⁿ[one(G)] == k(n, m, i)
|
||||||
|
@test Σ_W_Levᵢᵐ == k(n, m, i) * Levᵢⁿ
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user