mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-14 14:15:28 +01:00
update for changes in AbstractAlgebra, Groups, GroupRings
* MatSpaces are no longer Rings, they are modules (that's a hack, I know) * DirectProduct → DirectPower * full → GroupRings.dense * constructors of GroupRings require explicit basis
This commit is contained in:
parent
0614bf268d
commit
76b8fed6b1
@ -23,7 +23,7 @@ struct DirectProdCharacter{N, T<:AbstractCharacter} <: AbstractCharacter
|
||||
chars::NTuple{N, T}
|
||||
end
|
||||
|
||||
function (chi::DirectProdCharacter)(g::DirectProductGroupElem)
|
||||
function (chi::DirectProdCharacter)(g::DirectPowerGroupElem)
|
||||
res = 1
|
||||
for (χ, elt) in zip(chi.chars, g.elts)
|
||||
res *= χ(elt)
|
||||
@ -57,8 +57,8 @@ end
|
||||
|
||||
characters(G::Generic.PermGroup) = (PermCharacter(p) for p in AllParts(G.n))
|
||||
|
||||
function characters(G::DirectProductGroup)
|
||||
nfold_chars = Iterators.repeated(characters(G.group), G.n)
|
||||
function characters(G::DirectPowerGroup{N}) where N
|
||||
nfold_chars = Iterators.repeated(characters(G.group), N)
|
||||
return (DirectProdCharacter(idx) for idx in Iterators.product(nfold_chars...))
|
||||
end
|
||||
|
||||
@ -164,17 +164,19 @@ function rankOne_projections(RBn::GroupRing{G}, T::Type=Rational{Int}) where {G<
|
||||
Bn = RBn.group
|
||||
N = Bn.P.n
|
||||
# projections as elements of the group rings RSₙ
|
||||
Sn_rankOnePr = [rankOne_projections(GroupRing(PermutationGroup(i))) for i in typeof(N)(1):N]
|
||||
Sn_rankOnePr = [rankOne_projections(
|
||||
GroupRing(PermGroup(i), collect(PermGroup(i))))
|
||||
for i in typeof(N)(1):N]
|
||||
|
||||
# embedding into group ring of BN
|
||||
RN = GroupRing(Bn.N)
|
||||
RN = GroupRing(Bn.N, collect(Bn.N))
|
||||
|
||||
sign, id = collect(characters(Bn.N.group))
|
||||
# Bn.N = (Z/2Z)ⁿ characters corresponding to the first k coordinates:
|
||||
BnN_orbits = Dict(i => orbit_selector(N, i, sign, id) for i in 0:N)
|
||||
|
||||
Q = Dict(i => RBn(g -> Bn(g), central_projection(RN, BnN_orbits[i], T)) for i in 0:N)
|
||||
Q = Dict(key => full(val) for (key, val) in Q)
|
||||
Q = Dict(key => GroupRings.dense(val) for (key, val) in Q)
|
||||
|
||||
all_projs = [Q[0]*RBn(g->Bn(g), p) for p in Sn_rankOnePr[N]]
|
||||
|
||||
|
@ -28,7 +28,7 @@ function augIdproj(Q::AbstractMatrix{T}) where {T<:Real}
|
||||
return result
|
||||
end
|
||||
|
||||
function augIdproj(::Interval, Q::AbstractMatrix{T}) where {T<:Real}
|
||||
function augIdproj(::Type{Interval}, Q::AbstractMatrix{T}) where {T<:Real}
|
||||
result = zeros(Interval{T}, size(Q))
|
||||
l = size(Q, 2)
|
||||
Threads.@threads for j in 1:l
|
||||
|
@ -13,7 +13,7 @@ function spLaplacian(RG::GroupRing, S, T::Type=Float64)
|
||||
return result
|
||||
end
|
||||
|
||||
function spLaplacian(RG::GroupRing{R}, S, T::Type=Float64) where {R<:Ring}
|
||||
function spLaplacian(RG::GroupRing, S::Vector{REl}, T::Type=Float64) where {REl<:AbstractAlgebra.ModuleElem}
|
||||
result = RG(T)
|
||||
result[one(RG.group)] = T(length(S))
|
||||
for s in S
|
||||
@ -22,7 +22,7 @@ function spLaplacian(RG::GroupRing{R}, S, T::Type=Float64) where {R<:Ring}
|
||||
return result
|
||||
end
|
||||
|
||||
function Laplacian(S::Vector{E}, radius) where E<:AbstractAlgebra.RingElem
|
||||
function Laplacian(S::Vector{E}, radius) where E<:AbstractAlgebra.ModuleElem
|
||||
R = parent(first(S))
|
||||
return Laplacian(S, one(R), radius)
|
||||
end
|
||||
@ -37,10 +37,11 @@ function Laplacian(S, Id, radius)
|
||||
@time E_R, sizes = Groups.generate_balls(S, Id, radius=2radius)
|
||||
@info("Generated balls of sizes $sizes.")
|
||||
|
||||
@time pm = GroupRings.create_pm(E_R, GroupRings.reverse_dict(E_R), sizes[radius]; twisted=true)
|
||||
@info("Creating product matrix...")
|
||||
rdict = GroupRings.reverse_dict(E_R)
|
||||
@time pm = GroupRings.create_pm(E_R, rdict, sizes[radius]; twisted=true)
|
||||
|
||||
RG = GroupRing(parent(Id), E_R, pm)
|
||||
RG = GroupRing(parent(Id), E_R, rdict, pm)
|
||||
Δ = spLaplacian(RG, S)
|
||||
return Δ
|
||||
end
|
||||
|
@ -17,8 +17,8 @@ function OrbitData(RG::GroupRing, autS::Group, verbose=true)
|
||||
@assert sum(length(o) for o in orbs) == length(RG.basis)
|
||||
verbose && @info("The action has $(length(orbs)) orbits")
|
||||
|
||||
@time autS_mps = Projections.rankOne_projections(GroupRing(autS))
|
||||
verbose && @info("Projections in the Group Ring of AutS = $autS")
|
||||
@time autS_mps = Projections.rankOne_projections(GroupRing(autS, collect(autS)))
|
||||
|
||||
verbose && @info("AutS-action matrix representatives")
|
||||
@time preps = perm_reps(autS, RG.basis[1:size(RG.pm,1)], RG.basis_dict)
|
||||
@ -55,7 +55,7 @@ end
|
||||
|
||||
function orbit_decomposition(G::Group, E::Vector, rdict=GroupRings.reverse_dict(E))
|
||||
|
||||
elts = collect(elements(G))
|
||||
elts = collect(G)
|
||||
|
||||
tovisit = trues(size(E));
|
||||
orbits = Vector{Vector{Int}}()
|
||||
@ -139,7 +139,7 @@ function perm_repr(g::GroupElem, E::Vector, E_dict)
|
||||
end
|
||||
|
||||
function perm_reps(G::Group, E::Vector, E_rdict=GroupRings.reverse_dict(E))
|
||||
elts = collect(elements(G))
|
||||
elts = collect(G)
|
||||
l = length(elts)
|
||||
preps = Vector{perm}(undef, l)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user