diff --git a/experimental/BasisLieHighestWeight/src/BasisLieHighestWeight.jl b/experimental/BasisLieHighestWeight/src/BasisLieHighestWeight.jl index e3b287dd69e..eeab54ad2ae 100644 --- a/experimental/BasisLieHighestWeight/src/BasisLieHighestWeight.jl +++ b/experimental/BasisLieHighestWeight/src/BasisLieHighestWeight.jl @@ -10,7 +10,9 @@ import Oscar: dim import Oscar: monomial_ordering import Oscar: monomials -using Oscar.LieAlgebras: lie_algebra_simple_module_struct_consts_gap +using Oscar.LieAlgebras: + _root_system_type_string, + lie_algebra_simple_module_struct_consts_gap # temp imports until `LieAlgebraStructure` is abolished import Oscar: cartan_matrix, coefficient_ring, dim_of_simple_module, rank, root_system diff --git a/experimental/BasisLieHighestWeight/src/LieAlgebras.jl b/experimental/BasisLieHighestWeight/src/LieAlgebras.jl index ca7e65b9fcc..dd4486b5299 100644 --- a/experimental/BasisLieHighestWeight/src/LieAlgebras.jl +++ b/experimental/BasisLieHighestWeight/src/LieAlgebras.jl @@ -27,8 +27,11 @@ function coefficient_ring(L::LieAlgebraStructure) end function Base.show(io::IO, L::LieAlgebraStructure) - io = pretty(io) - print(io, LowercaseOff(), "Lie algebra of type $(L.lie_type)$(rank(L))") + show(io, L.lie_algebra) +end + +function Base.show(io::IO, mime::MIME, L::LieAlgebraStructure) + show(io, mime, L.lie_algebra) end function lie_algebra(type::Symbol, rk::Int) diff --git a/experimental/BasisLieHighestWeight/src/MonomialBasis.jl b/experimental/BasisLieHighestWeight/src/MonomialBasis.jl index 89d5e7197be..421aa9d7882 100644 --- a/experimental/BasisLieHighestWeight/src/MonomialBasis.jl +++ b/experimental/BasisLieHighestWeight/src/MonomialBasis.jl @@ -45,7 +45,22 @@ function Base.show(io::IO, ::MIME"text/plain", basis::MonomialBasis) print(io, Indent(), "\nof highest weight $(Int.(Oscar._vec(coefficients(highest_weight(basis)))))", Dedent()) print(io, Indent(), "\nof dimension $(dim(basis))", Dedent()) print(io, Indent(), "\nwith monomial ordering $(monomial_ordering(basis))", Dedent()) - print(io, "\nover ", Lowercase(), base_lie_algebra(basis)) + # TODO: use the following line instead of printing workaround below + # print(io, "\nover ", Lowercase(), base_lie_algebra(basis)) + # begin of workaround + L = base_lie_algebra(basis).lie_algebra + print(io, "\nover Lie algebra") + if has_root_system(L) + rs = root_system(L) + if has_root_system_type(rs) + type, ord = root_system_type_with_ordering(rs) + print(io, " of type ", _root_system_type_string(type)) + if !issorted(ord) + print(io, " (non-canonical ordering)") + end + end + end + # end of workaround if get_attribute(basis, :algorithm, nothing) === basis_lie_highest_weight_compute print( io, @@ -100,6 +115,21 @@ function Base.show(io::IO, basis::MonomialBasis) io, "Monomial basis of a highest weight module with highest weight $(Int.(Oscar._vec(coefficients(highest_weight(basis))))) over ", ) - print(terse(io), Lowercase(), base_lie_algebra(basis)) + # TODO: use the following line instead of printing workaround below + # print(terse(io), Lowercase(), base_lie_algebra(basis)) + # begin of workaround + L = base_lie_algebra(basis).lie_algebra + print(io, "Lie algebra") + if has_root_system(L) + rs = root_system(L) + if has_root_system_type(rs) + type, ord = root_system_type_with_ordering(rs) + print(io, " of type ", _root_system_type_string(type)) + if !issorted(ord) + print(io, " (non-canonical ordering)") + end + end + end + # end of workaround end end