1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-30 10:00:28 +01:00

update to the new Nemo.Generic module

This commit is contained in:
kalmarek 2017-09-15 18:17:50 +02:00
parent 5ac2876e31
commit 4e3bcbba6e
2 changed files with 12 additions and 12 deletions

View File

@ -141,7 +141,7 @@ function perm_reps{T<:GroupElem}(G::Group, S::Vector{T}, AutS::Group, radius::In
elts = collect(elements(AutS)) elts = collect(elements(AutS))
l = length(elts) l = length(elts)
preps = Vector{Nemo.perm}(l) preps = Vector{Generic.perm}(l)
G = Nemo.PermutationGroup(length(E_R)) G = Nemo.PermutationGroup(length(E_R))
@ -164,7 +164,7 @@ function perm_repr(g::GroupElem, E, E_dict)
return p return p
end end
function reconstruct_sol{T<:GroupElem, S<:Nemo.perm}(preps::Dict{T, S}, function reconstruct_sol{T<:GroupElem}(preps::Dict{T, Generic.perm},
aUs::Vector, aPs::Vector, adims::Vector) aUs::Vector, aPs::Vector, adims::Vector)
idx = [π for π in 1:length(aUs) if size(aUs[π], 2) != 0] idx = [π for π in 1:length(aUs) if size(aUs[π], 2) != 0]

View File

@ -7,17 +7,17 @@
abstract type AbstractCharacter <: Function end abstract type AbstractCharacter <: Function end
struct PermCharacter <: AbstractCharacter struct PermCharacter <: AbstractCharacter
p::Partition p::Generic.Partition
end end
struct DirectProdCharacter <: AbstractCharacter struct DirectProdCharacter <: AbstractCharacter
i::Int i::Int
end end
function (chi::PermCharacter)(g::Nemo.perm) function (chi::PermCharacter)(g::Generic.perm)
R = Nemo.partitionseq(chi.p) R = Nemo.partitionseq(chi.p)
p = Partition(Nemo.permtype(g)) p = Partition(Nemo.Generic.permtype(g))
return Int(Nemo.MN1inner(R, p, 1, Nemo._charvalsTable)) return Int(Nemo.Generic.MN1inner(R, p, 1, Nemo.Generic._charvalsTable))
end end
## NOTE: this works only for Z/2!!!! ## NOTE: this works only for Z/2!!!!
@ -61,7 +61,7 @@ function central_projection(RG::GroupRing, chi::AbstractCharacter,
return result return result
end end
function idempotents(RG::GroupRing{PermGroup}, T::Type=Rational{Int}) function idempotents(RG::GroupRing{Generic.PermGroup}, T::Type=Rational{Int})
if RG.group.n == 1 if RG.group.n == 1
return GroupRingElem{T}[one(RG,T)] return GroupRingElem{T}[one(RG,T)]
elseif RG.group.n == 2 elseif RG.group.n == 2
@ -70,7 +70,7 @@ function idempotents(RG::GroupRing{PermGroup}, T::Type=Rational{Int})
return GroupRingElem{T}[1//2*(Id + transp), 1//2*(Id - transp)] return GroupRingElem{T}[1//2*(Id + transp), 1//2*(Id - transp)]
end end
projs = Vector{Vector{perm}}() projs = Vector{Vector{Generic.perm}}()
for l in 2:RG.group.n for l in 2:RG.group.n
u = RG.group([circshift([i for i in 1:l], -1); [i for i in l+1:RG.group.n]]) u = RG.group([circshift([i for i in 1:l], -1); [i for i in l+1:RG.group.n]])
i = 0 i = 0
@ -112,7 +112,7 @@ function rankOne_projection(chi::PropertyT.PermCharacter, idems::Vector{S}) wher
throw("Couldn't find rank-one projection for $chi") throw("Couldn't find rank-one projection for $chi")
end end
function minimalprojections(G::PermutationGroup, T::Type=Rational{Int}) function minimalprojections(G::Generic.PermGroup, T::Type=Rational{Int})
if G.n == 1 if G.n == 1
return [one(GroupRing(G), T)] return [one(GroupRing(G), T)]
elseif G.n < 8 elseif G.n < 8
@ -136,7 +136,7 @@ function minimalprojections(G::PermutationGroup, T::Type=Rational{Int})
return min_projs return min_projs
end end
function rankOne_projections(G::PermutationGroup, T::Type=Rational{Int}) function rankOne_projections(G::Generic.PermGroup, T::Type=Rational{Int})
return minimalprojections(G, T) return minimalprojections(G, T)
end end
@ -159,8 +159,8 @@ function rankOne_projections(BN::WreathProduct, T::Type=Rational{Int})
range = collect(1:N) range = collect(1:N)
for i in 1:N-1 for i in 1:N-1
first_emb = g->BN(Nemo.emb!(BN.P(), g, range[1:i])) first_emb = g->BN(Nemo.Generic.emb!(BN.P(), g, range[1:i]))
last_emb = g->BN(Nemo.emb!(BN.P(), g, range[i+1:end])) last_emb = g->BN(Nemo.Generic.emb!(BN.P(), g, range[i+1:end]))
Sk_first = [RBN(p, first_emb) for p in SNprojs_nc[i]] Sk_first = [RBN(p, first_emb) for p in SNprojs_nc[i]]
Sk_last = [RBN(p, last_emb ) for p in SNprojs_nc[N-i]] Sk_last = [RBN(p, last_emb ) for p in SNprojs_nc[N-i]]