diff --git a/src/CharTable.jl b/src/CharTable.jl index 128129e1..d11a4e99 100644 --- a/src/CharTable.jl +++ b/src/CharTable.jl @@ -47,7 +47,7 @@ function CharTable(order::UPoly, table::Matrix{GenericCyclo}, classinfo::Vector{ ct=CharTable(order, classinfo, classlength, classsums, classparamindex, charparamindex, classparams, ring, information, chars, importname) for i in 1:num_chars - ct.chars[i]=GenericCharacter(ct, table[i,:], charinfo[i], chardegree[i], charsums[i], charparams[i]) + ct.chars[i]=GenericCharacter(ct, table[i,:], charinfo[i], chardegree[i], charsums[i], charparams[i], ParameterSubstitution[]) end return ct end @@ -87,6 +87,7 @@ struct GenericCharacter <: AbstractGenericCharacter degree::UPoly # Degree of the characters in this type sum::Union{Function, Nothing} # Function to sum a Cyclotomic over all characters in this type params::Parameters # Info about the parameters in this character type + substitutions::Vector{ParameterSubstitution} end eltype(::Type{GenericCharacter}) = GenericCyclo @@ -105,7 +106,8 @@ function (t::CharTable)(c::GenericCharacter) deepcopy(c.info), deepcopy(c.degree), deepcopy(c.sum), - deepcopy(c.params) + deepcopy(c.params), + deepcopy(c.substitutions) ) end diff --git a/src/Deprecations.jl b/src/Deprecations.jl index 4c0f23f9..92016010 100644 --- a/src/Deprecations.jl +++ b/src/Deprecations.jl @@ -1,35 +1 @@ -@doc raw""" - specclassparam!(t::CharTable, class::Int64, var::UPoly, expr::RingElement) - -Replace the parameter `var` with `expr` in the class type `class`. - -# Examples -```jldoctest -julia> g=generic_character_table("GL2"); - -julia> [c[1] for c in g] -4-element Vector{GenericCharacterTables.GenericCyclo}: - exp(2π𝑖((2*i*k)//(q - 1))) - q*exp(2π𝑖((2*i*k)//(q - 1))) - (q + 1)*exp(2π𝑖((i*l + i*k)//(q - 1))) - (q - 1)*exp(2π𝑖((i*k)//(q - 1))) - -julia> q,(i,j,l,k) = parameters(g); - -julia> specclassparam!(g, 1, k, 3) - -julia> [c[1] for c in g] -4-element Vector{GenericCharacterTables.GenericCyclo}: - exp(2π𝑖((6*i)//(q - 1))) - q*exp(2π𝑖((6*i)//(q - 1))) - (q + 1)*exp(2π𝑖((i*l + 3*i)//(q - 1))) - (q - 1)*exp(2π𝑖((3*i)//(q - 1))) -``` -""" -function specclassparam!(t::CharTable, class::Int64, var::UPoly, expr::RingElement) - for char in 1:length(t) - t[char].values[class]=evaluate(t[char,class], [var_index(var)], [expr]) - end - push!(t.classparams[class].substitutions, ParameterSubstitution(var, base_ring(t.ring)(expr))) - return nothing -end +# nothing right now diff --git a/src/Exports.jl b/src/Exports.jl index ba6b7fab..b5cc3015 100644 --- a/src/Exports.jl +++ b/src/Exports.jl @@ -24,6 +24,5 @@ export parameter export parameters export scalar_product export set_congruence -export specclassparam! export specialize export tensor_product diff --git a/src/GenericCharacter.jl b/src/GenericCharacter.jl index cfe3a67a..a47b8b3b 100644 --- a/src/GenericCharacter.jl +++ b/src/GenericCharacter.jl @@ -43,8 +43,8 @@ function tensor_product(char1::GenericCharacter, char2::GenericCharacter) end param1 = shift_char_parameters(t, char1.params, 4) param2 = shift_char_parameters(t, char2.params, 5) - new_char_params=Parameters(vcat(param1.params, param2.params), vcat(param1.exceptions, param2.exceptions), ParameterSubstitution[]) - return GenericCharacter(t, new_char_values, ["Tensor of type $char1id and $char2id"], new_char_degree, nothing, new_char_params) + new_char_params=Parameters(vcat(param1.params, param2.params), vcat(param1.exceptions, param2.exceptions)) + return GenericCharacter(t, new_char_values, ["Tensor of type $char1id and $char2id"], new_char_degree, nothing, new_char_params, ParameterSubstitution[]) end @doc raw""" @@ -114,7 +114,7 @@ function omega(char::GenericCharacter) for class in 1:number_of_conjugacy_class_types(t) new_char_values[class]=divexact(t.classlength[class]*char[class], degree(char)) end - return GenericCharacter(t, new_char_values, ["Omega of type $charid"], new_char_degree, nothing, char.params) + return GenericCharacter(t, new_char_values, ["Omega of type $charid"], new_char_degree, nothing, char.params, ParameterSubstitution[]) end @doc raw""" @@ -204,8 +204,8 @@ function linear_combination(coeffs::Vector{Int64}, chars::Vector{<:GenericCharac for i in 1:n params[i]=shift_char_parameters(t, chars[i].params, 5+i) end - new_char_params=Parameters(vcat(map(x -> x.params, params)...), vcat(map(x -> x.exceptions, params)...), ParameterSubstitution[]) - return GenericCharacter(t, new_char_values, ["linear_combination $info"], new_char_degree, nothing, new_char_params) + new_char_params=Parameters(vcat(map(x -> x.params, params)...), vcat(map(x -> x.exceptions, params)...)) + return GenericCharacter(t, new_char_values, ["linear_combination $info"], new_char_degree, nothing, new_char_params, ParameterSubstitution[]) end @doc raw""" @@ -391,10 +391,10 @@ function specialize(char::GenericCharacter, var::UPoly, expr::RingElement) for class in 1:number_of_conjugacy_class_types(t) new_char_values[class]=evaluate(char[class], [var_index(var)], [expr]) end - new_params=deepcopy(char.params) - push!(new_params.substitutions, ParameterSubstitution(var, base_ring(t.ring)(expr))) + substitutions=deepcopy(char.substitutions) + push!(substitutions, ParameterSubstitution(var, base_ring(t.ring)(expr))) # TODO: What about the sum function here? - return GenericCharacter(t, new_char_values, char.info, degree(char), nothing, new_params) + return GenericCharacter(t, new_char_values, char.info, degree(char), nothing, char.params, substitutions) end diff --git a/src/Parameter.jl b/src/Parameter.jl index 71f1cfb8..920afec1 100644 --- a/src/Parameter.jl +++ b/src/Parameter.jl @@ -30,15 +30,10 @@ Parameters of generic characters and class types. This is used in `GenericCharac struct Parameters params::Vector{Parameter} exceptions::Vector{UPolyFrac} - substitutions::Vector{ParameterSubstitution} -end - -function Parameters(p::Vector{Parameter},e::Vector{UPolyFrac}) - return Parameters(p,e,ParameterSubstitution[]) end function Parameters(p::Vector{Parameter}) - return Parameters(p,UPolyFrac[],ParameterSubstitution[]) + return Parameters(p,UPolyFrac[]) end # TODO Use OSCAR's expressify system here. @@ -57,7 +52,4 @@ function show(io::IO, a::Parameters) end end end - if !isempty(a.substitutions) - print(io, ", substitutions: $(join(a.substitutions, ", "))") - end end diff --git a/src/Shifts.jl b/src/Shifts.jl index 7dd9e36f..2b6d6980 100644 --- a/src/Shifts.jl +++ b/src/Shifts.jl @@ -26,13 +26,9 @@ end function var_shift(a::Parameter, vars::Vector{Int64}, step_size::Int64, steps::Int64) return Parameter(var_shift(a.var, vars, step_size, steps), a.modulus) end -function var_shift(a::ParameterSubstitution, vars::Vector{Int64}, step_size::Int64, steps::Int64) - return ParameterSubstitution(var_shift(a.var, vars, step_size, steps), var_shift(a.expression, vars, step_size, steps)) -end function var_shift(a::Parameters, vars::Vector{Int64}, step_size::Int64, steps::Int64) return Parameters(var_shift.(a.params, Ref(vars),Ref(step_size), Ref(steps)), - var_shift.(a.exceptions, Ref(vars),Ref(step_size), Ref(steps)), - var_shift.(a.substitutions, Ref(vars),Ref(step_size), Ref(steps))) + var_shift.(a.exceptions, Ref(vars),Ref(step_size), Ref(steps))) end @doc raw""" diff --git a/src/Show.jl b/src/Show.jl index 21cd20e5..7ee62eae 100644 --- a/src/Show.jl +++ b/src/Show.jl @@ -75,7 +75,11 @@ function show(io::IO, ::MIME"text/plain", c::AbstractGenericCharacter) println(io, "Generic character of ", parent(c).importname, Indent()) if c isa GenericCharacter && !isempty(c.params.params) println(io, "with parameters ", Indent()) - println(io, c.params, Dedent()) + print(io, c.params) + if !isempty(c.substitutions) + print(io, ", substitutions: $(join(c.substitutions, ", "))") + end + println(io, Dedent()) end println(io, "of degree ", degree(c)) print(io, "with values", Indent())