diff --git a/src/DeformationBases/ArcDiagDeformBasis.jl b/src/DeformationBases/ArcDiagDeformBasis.jl index 5697120..144124c 100644 --- a/src/DeformationBases/ArcDiagDeformBasis.jl +++ b/src/DeformationBases/ArcDiagDeformBasis.jl @@ -7,31 +7,31 @@ Each element of the basis is induced by an arc diagram of a suitable size, which gets symmetrized and specialised to the given smash product. This process is due to [FM22](@cite). """ -struct ArcDiagDeformBasis{C <: RingElem} <: DeformBasis{C} +struct ArcDiagDeformBasis{T <: SmashProductLieElem} <: DeformBasis{T} len::Int iter - extra_data::Dict{DeformationMap{C}, Set{ArcDiagram}} + extra_data::Dict{DeformationMap{T}, Set{ArcDiagram}} normalize - function ArcDiagDeformBasis{C}( - sp::SmashProductLie{C}, + function ArcDiagDeformBasis{T}( + sp::SmashProductLie{C, LieC, LieT}, degs::AbstractVector{Int}; no_normalize::Bool=false, - ) where {C <: RingElem} - T = get_attribute(base_lie_algebra(sp), :type, nothing)::Union{Nothing,Symbol} - @req T in [:special_orthogonal, :general_linear] "Only works for so_n and gl_n." - if T == :special_orthogonal && has_attribute(base_lie_algebra(sp), :form) + ) where {C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}, T <: SmashProductLieElem{C, LieC, LieT}} + LieType = get_attribute(base_lie_algebra(sp), :type, nothing)::Union{Nothing,Symbol} + @req LieType in [:special_orthogonal, :general_linear] "Only works for so_n and gl_n." + if LieType == :special_orthogonal && has_attribute(base_lie_algebra(sp), :form) @req isone(get_attribute(base_lie_algebra(sp), :form)::dense_matrix_type(C)) "Only works for so_n represented as skew-symmetric matrices." end - return ArcDiagDeformBasis{C}(Val(T), sp, degs; no_normalize) + return ArcDiagDeformBasis{T}(Val(LieType), sp, degs; no_normalize) end - function ArcDiagDeformBasis{C}( - T::Union{SO, GL}, - sp::SmashProductLie{C}, + function ArcDiagDeformBasis{T}( + LieType::Union{SO, GL}, + sp::SmashProductLie{C, LieC, LieT}, degs::AbstractVector{Int}; no_normalize::Bool=false, - ) where {C <: RingElem} + ) where {C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}, T <: SmashProductLieElem{C, LieC, LieT}} V = base_module(sp) V_nice, h = isomorphic_module_with_simple_structure(V) @@ -43,7 +43,7 @@ struct ArcDiagDeformBasis{C <: RingElem} <: DeformBasis{C} V_nice = temp end - extra_data = Dict{DeformationMap{C}, Set{ArcDiagram}}() + extra_data = Dict{DeformationMap{T}, Set{ArcDiagram}}() normalize = no_normalize ? identity : normalize_default n_cases = div(length(V_nice_summands) * (length(V_nice_summands) + 1), 2) @@ -69,12 +69,12 @@ struct ArcDiagDeformBasis{C <: RingElem} <: DeformBasis{C} tensor_product(V_nice_summand_i_l, V_nice_summand_i_r) end - diag_iter = pbw_arc_diagrams(T, W, d) + diag_iter = pbw_arc_diagrams(LieType, W, d) len = length(diag_iter) iter = ( begin @vprintln :PBWDeformations 2 "Basis generation deg $(lpad(d, maximum(ndigits, degs))), case $(lpad(case, ndigits(n_cases)))/$(n_cases), $(lpad(floor(Int, 100*counter / len), 3))%, $(lpad(counter, ndigits(len)))/$(len)" - _basis_elem = arcdiag_to_deformationmap(T, diag, sp, W) + _basis_elem = arcdiag_to_deformationmap(LieType, diag, sp, W) basis_elem = matrix(proj_to_summand_l) * _basis_elem * transpose(matrix(proj_to_summand_r)) if i_l != i_r basis_elem -= transpose(basis_elem) @@ -103,13 +103,13 @@ struct ArcDiagDeformBasis{C <: RingElem} <: DeformBasis{C} iter = Iterators.flatten(iters) if !no_normalize iter = unique(Iterators.filter(b -> !iszero(b), iter)) - collected = Vector{DeformationMap{C}}(collect(iter))::Vector{DeformationMap{C}} + collected = Vector{DeformationMap{T}}(collect(iter))::Vector{DeformationMap{T}} _, rels = is_linearly_independent_with_relations(coefficient_ring(sp), collected) inds = [findlast(!iszero, vec(rels[i, :]))::Int for i in 1:nrows(rels)] deleteat!(collected, inds) - return new{C}(length(collected), collected, extra_data, normalize) + return new{T}(length(collected), collected, extra_data, normalize) end - return new{C}(len, iter, extra_data, normalize) + return new{T}(len, iter, extra_data, normalize) end end diff --git a/src/DeformationBases/DeformBasis.jl b/src/DeformationBases/DeformBasis.jl index e9b6a49..24ad01e 100644 --- a/src/DeformationBases/DeformBasis.jl +++ b/src/DeformationBases/DeformBasis.jl @@ -1,15 +1,15 @@ -Base.eltype(::Type{<:DeformBasis{C}}) where {C <: RingElem} = DeformationMap{C} +Base.eltype(::Type{<:DeformBasis{T}}) where {T <: SmashProductLieElem} = DeformationMap{T} Base.length(basis::DeformBasis) = error("length not implemented for $(typeof(basis))") """ - lookup_data(m::DeformationMap{C}, basis::DeformBasis{C}) where {C <: RingElem} + lookup_data(m::DeformationMap{T}, basis::DeformBasis{T}) where {T <: SmashProductLieElem} Look up additional data that was used to generate the deformation map `m` in the basis `basis`. This can e.g. be an arc diagram or a pseudograph. """ -function lookup_data(m::DeformationMap{C}, basis::DeformBasis{C}) where {C <: RingElem} +function lookup_data(m::DeformationMap{T}, basis::DeformBasis{T}) where {T <: SmashProductLieElem} m = basis.normalize(m) if haskey(basis.extra_data, m) return basis.extra_data[m] @@ -18,7 +18,7 @@ function lookup_data(m::DeformationMap{C}, basis::DeformBasis{C}) where {C <: Ri end end -function normalize_default(m::DeformationMap{C}) where {C <: RingElem} +function normalize_default(m::DeformationMap{T}) where {T <: SmashProductLieElem} nz_index = findfirst(x -> !iszero(x), m) if nz_index === nothing return m diff --git a/src/DeformationBases/PseudographDeformBasis.jl b/src/DeformationBases/PseudographDeformBasis.jl index 9d9a3fa..5479152 100644 --- a/src/DeformationBases/PseudographDeformBasis.jl +++ b/src/DeformationBases/PseudographDeformBasis.jl @@ -5,31 +5,31 @@ certain properties, which gets transformed to an arc diagram and then handled as in [`ArcDiagDeformBasis`](@ref). This process is due to [FM22](@cite). """ -struct PseudographDeformBasis{C <: RingElem} <: DeformBasis{C} +struct PseudographDeformBasis{T <: SmashProductLieElem} <: DeformBasis{T} len::Int iter - extra_data::Dict{DeformationMap{C}, Set{Tuple{PseudographLabelled{Int}, Partition{Int}}}} + extra_data::Dict{DeformationMap{T}, Set{Tuple{PseudographLabelled{Int}, Partition{Int}}}} normalize - function PseudographDeformBasis{C}( - sp::SmashProductLie{C}, + function PseudographDeformBasis{T}( + sp::SmashProductLie{C, LieC, LieT}, degs::AbstractVector{Int}; no_normalize::Bool=false, - ) where {C <: RingElem} - T = get_attribute(base_lie_algebra(sp), :type, nothing) - @req T == :special_orthogonal "Only works for so_n." - if T == :special_orthogonal && has_attribute(base_lie_algebra(sp), :form) + ) where {C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}, T <: SmashProductLieElem{C, LieC, LieT}} + LieType = get_attribute(base_lie_algebra(sp), :type, nothing) + @req LieType == :special_orthogonal "Only works for so_n." + if LieType == :special_orthogonal && has_attribute(base_lie_algebra(sp), :form) @req isone(get_attribute(base_lie_algebra(sp), :form)) "Only works for so_n represented as skew-symmetric matrices." end - return PseudographDeformBasis{C}(Val(T), sp, degs; no_normalize) + return PseudographDeformBasis{T}(Val(LieType), sp, degs; no_normalize) end - function PseudographDeformBasis{C}( - T::Union{Val{:special_orthogonal}}, - sp::SmashProductLie{C}, + function PseudographDeformBasis{T}( + LieType::Union{Val{:special_orthogonal}}, + sp::SmashProductLie{C, LieC, LieT}, degs::AbstractVector{Int}; no_normalize::Bool=false, - ) where {C <: RingElem} + ) where {C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}, T <: SmashProductLieElem{C, LieC, LieT}} fl, Vbase, e = _is_exterior_power(base_module(sp)) @req fl && _is_standard_module(Vbase) "Only works for exterior powers of the standard module." @@ -46,7 +46,7 @@ struct PseudographDeformBasis{C <: RingElem} <: DeformBasis{C} begin @vprintln :PBWDeformations 2 "Basis generation deg $(lpad(d, maximum(ndigits, degs))), $(lpad(floor(Int, 100*(debug_counter = (debug_counter % len) + 1) / len), 3))%, $(lpad(debug_counter, ndigits(len)))/$(len)" diag = to_arcdiag(pg, part) - basis_elem = arcdiag_to_deformationmap(T, diag, sp) + basis_elem = arcdiag_to_deformationmap(LieType, diag, sp) if !no_normalize basis_elem = normalize(basis_elem) end @@ -65,7 +65,7 @@ struct PseudographDeformBasis{C <: RingElem} <: DeformBasis{C} iter = Iterators.flatten(iters) if !no_normalize iter = unique(Iterators.filter(b -> !iszero(b), iter)) - collected = Vector{DeformationMap{C}}(collect(iter)) + collected = Vector{DeformationMap{T}}(collect(iter))::Vector{DeformationMap{T}} _, rels = is_linearly_independent_with_relations(coefficient_ring(sp), reverse(collected)) inds = [1 + ncols(rels) - (findfirst(!iszero, vec(rels[i, :]))::Int) for i in nrows(rels):-1:1] deleteat!(collected, inds) diff --git a/src/DeformationBases/StdDeformBasis.jl b/src/DeformationBases/StdDeformBasis.jl index 443d454..994705d 100644 --- a/src/DeformationBases/StdDeformBasis.jl +++ b/src/DeformationBases/StdDeformBasis.jl @@ -4,13 +4,16 @@ Each element of the basis is a skew-symmetric matrix with 2 non-zero entries, where one entry is a pure tensor power of degree ∈ `degs` over the Lie algebra part of the smash product, and the other entry is its additive inverse. """ -struct StdDeformBasis{C <: RingElem} <: DeformBasis{C} +struct StdDeformBasis{T <: SmashProductLieElem} <: DeformBasis{T} len::Int iter - extra_data::Dict{DeformationMap{C}, Nothing} + extra_data::Dict{DeformationMap{T}, Nothing} normalize - function StdDeformBasis{C}(sp::SmashProductLie{C}, degs::AbstractVector{Int}) where {C <: RingElem} + function StdDeformBasis{T}( + sp::SmashProductLie{C, LieC, LieT}, + degs::AbstractVector{Int} + ) where {C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}, T <: SmashProductLieElem{C, LieC, LieT}} dimL = dim(base_lie_algebra(sp)) dimV = dim(base_module(sp)) iter = ( @@ -24,7 +27,7 @@ struct StdDeformBasis{C <: RingElem} <: DeformBasis{C} ) len = div(dimV * (dimV - 1), 2) * sum(binomial(dimL + k - 1, k) for k in degs) - return new{C}(len, iter, Dict{DeformationMap{C}, Nothing}(), normalize_default) + return new{T}(len, iter, Dict{DeformationMap{T}, Nothing}(), normalize_default) end end diff --git a/src/SmashProductLieDeform.jl b/src/SmashProductLieDeform.jl index c7cff41..ba1f62f 100644 --- a/src/SmashProductLieDeform.jl +++ b/src/SmashProductLieDeform.jl @@ -257,7 +257,7 @@ end ############################################################################### """ - deform(sp::SmashProductLie{C}, kappa::DeformationMap{C}) where {C <: RingElem} + deform(sp::SmashProductLie{C}, kappa::DeformationMap{elem_type(sp)}) where {C <: RingElem} Constructs the deformation of the smash product `sp` by the deformation map `kappa`. @@ -265,19 +265,20 @@ Returns a [`SmashProductLieDeform`](@ref) struct and a two-part basis. """ function deform( sp::SmashProductLie{C, LieC, LieT}, - kappa::DeformationMap{C}, + kappa::DeformationMap{SmashProductLieElem{C, LieC, LieT}}, ) where {C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}} dimL = dim(base_lie_algebra(sp)) dimV = dim(base_module(sp)) @req size(kappa) == (dimV, dimV) "kappa has wrong dimensions." + @req all(e -> parent(e) == sp, kappa) "Incompatible smash products." basisV = [gen(underlying_algebra(sp), dimL + i) for i in 1:dimV] for i in 1:dimV, j in 1:i @req kappa[i, j] == -kappa[j, i] "kappa is not skew-symmetric." - @req all(x -> x <= dimL, Iterators.flatten(exponent_words(kappa[i, j]))) "kappa does not only take values in the hopf algebra" - @req all(x -> x <= dimL, Iterators.flatten(exponent_words(kappa[j, i]))) "kappa does not only take values in the hopf algebra" + @req all(<=(dimL), Iterators.flatten(exponent_words(kappa[i, j].alg_elem))) "kappa does not only take values in the hopf algebra" + @req all(<=(dimL), Iterators.flatten(exponent_words(kappa[j, i].alg_elem))) "kappa does not only take values in the hopf algebra" end symmetric = true @@ -285,7 +286,7 @@ function deform( for i in 1:dimV, j in 1:dimV # We have the commutator relation [v_i, v_j] = kappa[i,j] # which is equivalent to v_i*v_j = v_j*v_i + kappa[i,j] - rels[dimL+i, dimL+j] = basisV[j] * basisV[i] + kappa[i, j] + rels[dimL+i, dimL+j] = basisV[j] * basisV[i] + simplify(kappa[i, j]).alg_elem symmetric &= iszero(kappa[i, j]) end @@ -298,10 +299,9 @@ end function deform( sp::SmashProductLie{C, LieC, LieT}, - kappa::MatElem{SmashProductLieElem{C, LieC, LieT}}, + kappa::MatElem{<:FreeAssAlgElem{C}}, ) where {C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}} - @req all(x -> parent(x) == sp, kappa) "Incompatible smash products." - return deform(sp, map_entries(x -> x.alg_elem, kappa)) + return deform(sp, map_entries(sp, kappa)) end """ @@ -312,7 +312,7 @@ Constructs the symmetric deformation of the smash product `sp`. function symmetric_deformation( sp::SmashProductLie{C, LieC, LieT}, ) where {C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}} - kappa = zero_matrix(underlying_algebra(sp), dim(base_module(sp)), dim(base_module(sp))) + kappa = zero_matrix(sp, dim(base_module(sp)), dim(base_module(sp))) d = deform(sp, kappa) return d end diff --git a/src/SmashProductPBWDeformLie.jl b/src/SmashProductPBWDeformLie.jl index 5790057..43a7525 100644 --- a/src/SmashProductPBWDeformLie.jl +++ b/src/SmashProductPBWDeformLie.jl @@ -90,7 +90,7 @@ end """ - all_pbwdeformations(sp::SmashProductLie{C}, deform_basis::DeformBasis{C}; special_return=Nothing) where {C <: RingElem} + all_pbwdeformations(sp::SmashProductLie{C}, deform_basis::DeformBasis{elem_type(sp)}; special_return=Nothing) where {C <: RingElem} Computes a basis of all Poincare-Birkhoff-Witt deformations of `sp`. `deform_basis` specifies the basis to use for the space of deformation maps. @@ -99,10 +99,10 @@ If `special_return` is `SMat`, the function returns intermediate results. Uses [`pbwdeform_eqs`](@ref) and thus Theorem 3.1 of [WW14](@cite). """ function all_pbwdeformations( - sp::SmashProductLie{C}, - deform_basis::DeformBasis{C}; + sp::SmashProductLie{C, LieC, LieT}, + deform_basis::DeformBasis{SmashProductLieElem{C, LieC, LieT}}; special_return::Type{T}=Nothing, -) where {C <: RingElem, T <: Union{Nothing, SMat}} +) where {C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}, T <: Union{Nothing, SMat}} @req coefficient_ring(sp) == QQ "Only implemented for QQ coefficients." dimL = dim(base_lie_algebra(sp)) @@ -157,7 +157,7 @@ function all_pbwdeformations( end @vprintln :PBWDeformations 1 "Computing a basis..." - kappas = Vector{DeformationMap{C}}(undef, ker_dim) + kappas = Vector{DeformationMap{elem_type(sp)}}(undef, ker_dim) for l in 1:ker_dim kappa = zero_matrix(underlying_algebra(sp), dimV, dimV) for (i, b) in enumerate(deform_basis) diff --git a/src/Types.jl b/src/Types.jl index c0b42ef..e02c127 100644 --- a/src/Types.jl +++ b/src/Types.jl @@ -211,34 +211,6 @@ struct PseudographLabelled{T} end end -################################################################################ -# -# Deformation maps -# -################################################################################ - -""" - DeformationMap{C} = MatElem{FreeAssAlgElem{C}} where {C <: RingElem} - -The type for deformation maps of a Lie algebra smash product. -The entry `kappa[i,j]` should be the image of ``v_i \\wedge v_j`` under the deformation map, i.e. ``κ(v_i,v_j)``. -Deformation maps are always assumed to be quadratic and skew-symmetric. -""" -const DeformationMap{C} = MatElem{<:FreeAssAlgElem{C}} where {C <: RingElem} # TODO: make concrete type - - -""" - abstract type DeformBasis{C <: RingElem} end - -A basis for a deformation map space of a Lie algebra smash product. -The constructor of a subtype should accept a [`SmashProductLie`](@ref) and an `AbstractVector{Int}` of degrees. -It is required that `Base.length` and `Base.iterate` are implemented for subtypes, -where iterating yields objects of type `DeformationMap{C}`. - -For a reference implementation, we refer to [`StdDeformBasis`](@ref). -""" -abstract type DeformBasis{C <: RingElem} end - ################################################################################ # # Smash products @@ -284,6 +256,34 @@ mutable struct SmashProductLieElem{C <: RingElem, LieC <: FieldElem, LieT <: Lie end end +################################################################################ +# +# Deformation maps +# +################################################################################ + +""" + DeformationMap{T} = MatElem{T} where {T <: SmashProductLieElem} + +The type for deformation maps of a Lie algebra smash product. +The entry `kappa[i,j]` should be the image of ``v_i \\wedge v_j`` under the deformation map, i.e. ``κ(v_i,v_j)``. +Deformation maps are always assumed to be quadratic and skew-symmetric. +""" +const DeformationMap{T} = MatElem{T} where {T <: SmashProductLieElem} # TODO: make concrete type + + +""" + abstract type DeformBasis{T <: SmashProductLieElem} end + +A basis for a deformation map space of a Lie algebra smash product. +The constructor of a subtype should accept a [`SmashProductLie`](@ref) and an `AbstractVector{Int}` of degrees. +It is required that `Base.length` and `Base.iterate` are implemented for subtypes, +where iterating yields objects of type `DeformationMap{C}`. + +For a reference implementation, we refer to [`StdDeformBasis`](@ref). +""" +abstract type DeformBasis{T <: SmashProductLieElem} end + ################################################################################ # # Smash product deformations @@ -299,13 +299,13 @@ It gets created by calling [`deform`](@ref). NCRing sp::SmashProductLie{C, LieC, LieT} rels::Matrix{Union{Nothing, FreeAssAlgElem{C}}} - kappa::DeformationMap{C} + kappa::DeformationMap{SmashProductLieElem{C, LieC, LieT}} # default constructor for @attributes function SmashProductLieDeform{C, LieC, LieT}( sp::SmashProductLie{C, LieC, LieT}, rels::Matrix{Union{Nothing, FreeAssAlgElem{C}}}, - kappa::DeformationMap{C}, + kappa::DeformationMap{SmashProductLieElem{C, LieC, LieT}}, ) where {C <: RingElem, LieC <: FieldElem, LieT <: LieAlgebraElem{LieC}} new{C, LieC, LieT}(sp, rels, kappa) end diff --git a/test/DeformationBases-test.jl b/test/DeformationBases-test.jl index cc4cc33..61a6077 100644 --- a/test/DeformationBases-test.jl +++ b/test/DeformationBases-test.jl @@ -27,12 +27,12 @@ V = exterior_power_obj(standard_module(L), 2) sp = smash_product(L, V) - @test all_pbwdeformations(sp, ArcDiagDeformBasis{QQFieldElem}(sp, 0:0); special_return=SMat)[1] == + @test all_pbwdeformations(sp, ArcDiagDeformBasis{elem_type(sp)}(sp, 0:0); special_return=SMat)[1] == matrix(QQ, 0, 0, []) - @test all_pbwdeformations(sp, ArcDiagDeformBasis{QQFieldElem}(sp, 0:1); special_return=SMat)[1] == + @test all_pbwdeformations(sp, ArcDiagDeformBasis{elem_type(sp)}(sp, 0:1); special_return=SMat)[1] == matrix(QQ, 1, 1, [1]) - b = ArcDiagDeformBasis{QQFieldElem}(sp, 0:2) + b = ArcDiagDeformBasis{elem_type(sp)}(sp, 0:2) @test length(collect(b)) == 1 if VERSION <= v"1.7-" @test_broken repr("text/plain", collect(b)) == @@ -44,7 +44,7 @@ @test all_pbwdeformations(sp, b; special_return=SMat)[1] == matrix(QQ, 1, 1, [1]) @test all_pbwdeformations(sp, b) == collect(b) - b = ArcDiagDeformBasis{QQFieldElem}(sp, 0:3) + b = ArcDiagDeformBasis{elem_type(sp)}(sp, 0:3) @test length(collect(b)) == 3 @test all_pbwdeformations(sp, b; special_return=SMat)[1] == matrix(QQ, [1 0; 0 -3//2; 0 1]) ms = all_pbwdeformations(sp, b) @@ -58,12 +58,12 @@ V = exterior_power_obj(standard_module(L), 2) sp = smash_product(L, V) - @test all_pbwdeformations(sp, ArcDiagDeformBasis{QQFieldElem}(sp, 0:0); special_return=SMat)[1] == + @test all_pbwdeformations(sp, ArcDiagDeformBasis{elem_type(sp)}(sp, 0:0); special_return=SMat)[1] == matrix(QQ, 0, 0, []) - @test all_pbwdeformations(sp, ArcDiagDeformBasis{QQFieldElem}(sp, 0:1); special_return=SMat)[1] == + @test all_pbwdeformations(sp, ArcDiagDeformBasis{elem_type(sp)}(sp, 0:1); special_return=SMat)[1] == matrix(QQ, 1, 1, [1]) - b = ArcDiagDeformBasis{QQFieldElem}(sp, 0:2) + b = ArcDiagDeformBasis{elem_type(sp)}(sp, 0:2) @test length(collect(b)) == 1 if VERSION <= v"1.7-" @test_broken repr("text/plain", collect(b)) == @@ -81,12 +81,12 @@ V = symmetric_power_obj(standard_module(L), 2) sp = smash_product(L, V) - @test all_pbwdeformations(sp, ArcDiagDeformBasis{QQFieldElem}(sp, 0:0); special_return=SMat)[1] == + @test all_pbwdeformations(sp, ArcDiagDeformBasis{elem_type(sp)}(sp, 0:0); special_return=SMat)[1] == matrix(QQ, 0, 0, []) - @test all_pbwdeformations(sp, ArcDiagDeformBasis{QQFieldElem}(sp, 0:1); special_return=SMat)[1] == + @test all_pbwdeformations(sp, ArcDiagDeformBasis{elem_type(sp)}(sp, 0:1); special_return=SMat)[1] == matrix(QQ, 1, 1, [1]) - b = ArcDiagDeformBasis{QQFieldElem}(sp, 0:2) + b = ArcDiagDeformBasis{elem_type(sp)}(sp, 0:2) @test length(collect(b)) == 2 @test all_pbwdeformations(sp, b; special_return=SMat)[1] == matrix(QQ, 2, 1, [1, 0]) @test all_pbwdeformations(sp, b) == collect(b)[1:1] @@ -97,12 +97,12 @@ V = symmetric_power_obj(standard_module(L), 2) sp = smash_product(L, V) - @test all_pbwdeformations(sp, ArcDiagDeformBasis{QQFieldElem}(sp, 0:0); special_return=SMat)[1] == + @test all_pbwdeformations(sp, ArcDiagDeformBasis{elem_type(sp)}(sp, 0:0); special_return=SMat)[1] == matrix(QQ, 0, 0, []) - @test all_pbwdeformations(sp, ArcDiagDeformBasis{QQFieldElem}(sp, 0:1); special_return=SMat)[1] == + @test all_pbwdeformations(sp, ArcDiagDeformBasis{elem_type(sp)}(sp, 0:1); special_return=SMat)[1] == matrix(QQ, 1, 1, [1]) - b = ArcDiagDeformBasis{QQFieldElem}(sp, 0:2) + b = ArcDiagDeformBasis{elem_type(sp)}(sp, 0:2) @test length(collect(b)) == 2 @test all_pbwdeformations(sp, b; special_return=SMat)[1] == matrix(QQ, 2, 1, [1, 0]) @test all_pbwdeformations(sp, b) == collect(b)[1:1] @@ -113,7 +113,7 @@ V = tensor_power_obj(standard_module(L), 2) sp = smash_product(L, V) - b = ArcDiagDeformBasis{QQFieldElem}(sp, 0:0) + b = ArcDiagDeformBasis{elem_type(sp)}(sp, 0:0) @test length(b) == 0 ms = all_pbwdeformations(sp, b) @test length(ms) == 0 @@ -124,7 +124,7 @@ V = tensor_power_obj(standard_module(L), 2) sp = smash_product(L, V) - b = ArcDiagDeformBasis{QQFieldElem}(sp, 0:0) + b = ArcDiagDeformBasis{elem_type(sp)}(sp, 0:0) @test length(b) == 0 ms = all_pbwdeformations(sp, b) @test length(ms) == 0 @@ -139,7 +139,7 @@ V = tensor_power_obj(standard_module(L), 3) sp = smash_product(L, V) - b = ArcDiagDeformBasis{QQFieldElem}(sp, 0:0) + b = ArcDiagDeformBasis{elem_type(sp)}(sp, 0:0) @test length(b) == 3 ms = all_pbwdeformations(sp, b) @test length(ms) == 3 @@ -160,7 +160,7 @@ V = tensor_power_obj(standard_module(L), 3) sp = smash_product(L, V) - b = ArcDiagDeformBasis{QQFieldElem}(sp, 0:0) + b = ArcDiagDeformBasis{elem_type(sp)}(sp, 0:0) @test length(b) == 4 ms = all_pbwdeformations(sp, b) @test length(ms) == 4 @@ -185,12 +185,12 @@ V = exterior_power_obj(standard_module(L), 2) sp = smash_product(L, V) - @test all_pbwdeformations(sp, PseudographDeformBasis{QQFieldElem}(sp, 0:0); special_return=SMat)[1] == + @test all_pbwdeformations(sp, PseudographDeformBasis{elem_type(sp)}(sp, 0:0); special_return=SMat)[1] == matrix(QQ, 0, 0, []) - @test all_pbwdeformations(sp, PseudographDeformBasis{QQFieldElem}(sp, 0:1); special_return=SMat)[1] == + @test all_pbwdeformations(sp, PseudographDeformBasis{elem_type(sp)}(sp, 0:1); special_return=SMat)[1] == matrix(QQ, 1, 1, [1]) - b = PseudographDeformBasis{QQFieldElem}(sp, 0:2) + b = PseudographDeformBasis{elem_type(sp)}(sp, 0:2) @test length(collect(b)) == 1 if VERSION <= v"1.7-" @test_broken repr("text/plain", collect(b)) == @@ -202,7 +202,7 @@ @test all_pbwdeformations(sp, b; special_return=SMat)[1] == matrix(QQ, 1, 1, [1]) @test all_pbwdeformations(sp, b) == collect(b) - b = PseudographDeformBasis{QQFieldElem}(sp, 0:3) + b = PseudographDeformBasis{elem_type(sp)}(sp, 0:3) @test length(collect(b)) == 3 @test all_pbwdeformations(sp, b; special_return=SMat)[1] == matrix(QQ, [1 0; 0 -3//2; 0 1]) ms = all_pbwdeformations(sp, b) @@ -216,12 +216,12 @@ V = exterior_power_obj(standard_module(L), 2) sp = smash_product(L, V) - @test all_pbwdeformations(sp, PseudographDeformBasis{QQFieldElem}(sp, 0:0); special_return=SMat)[1] == + @test all_pbwdeformations(sp, PseudographDeformBasis{elem_type(sp)}(sp, 0:0); special_return=SMat)[1] == matrix(QQ, 0, 0, []) - @test all_pbwdeformations(sp, PseudographDeformBasis{QQFieldElem}(sp, 0:1); special_return=SMat)[1] == + @test all_pbwdeformations(sp, PseudographDeformBasis{elem_type(sp)}(sp, 0:1); special_return=SMat)[1] == matrix(QQ, 1, 1, [1]) - b = PseudographDeformBasis{QQFieldElem}(sp, 0:2) + b = PseudographDeformBasis{elem_type(sp)}(sp, 0:2) @test length(collect(b)) == 1 if VERSION <= v"1.7-" @test_broken repr("text/plain", collect(b)) == @@ -233,7 +233,7 @@ @test all_pbwdeformations(sp, b; special_return=SMat)[1] == matrix(QQ, 1, 1, [1]) @test all_pbwdeformations(sp, b) == collect(b) - b = PseudographDeformBasis{QQFieldElem}(sp, 0:3) + b = PseudographDeformBasis{elem_type(sp)}(sp, 0:3) @test length(collect(b)) == 4 @test all_pbwdeformations(sp, b; special_return=SMat)[1] == matrix(QQ, 4, 1, [1, 0, 0, 0]) @test all_pbwdeformations(sp, b) == collect(b)[1:1]