Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: clean up for algebras #1623

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/src/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export default defineConfig({
{ text: 'Introduction', link: 'manual/algebras/intro'},
{ text: 'Basics', link: 'manual/algebras/basics'},
{ text: 'Structure constant algebras', link: 'manual/algebras/structureconstant'},
{ text: 'Ideals', link: 'manual/algebras/ideals'},
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/src/manual/algebras/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ end

## Creation of algebras

See the corresponding sections in ?????
See the corresponding sections on [structure constant algebras](@ref SCA).
```@docs
zero_algebra(::Field)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/src/manual/algebras/structureconstant.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Structure constant algebras
# [Structure constant algebras](@id SCA)

```@meta
CurrentModule = Hecke
Expand Down
4 changes: 2 additions & 2 deletions src/AlgAss/AbsAlgAss.jl
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ of the basis elements of $A$ and a map from $B$ to $A$.
function regular_matrix_algebra(A::Union{ StructureConstantAlgebra, GroupAlgebra })
K = base_ring(A)
B = matrix_algebra(K, [ representation_matrix(A[i], :right) for i = 1:dim(A) ], isbasis = true)
return B, hom(B, A, identity_matrix(K, dim(A)), identity_matrix(K, dim(A)))
return B, hom(B, A, identity_matrix(K, dim(A)), identity_matrix(K, dim(A)); check = false)
end

###############################################################################
Expand Down Expand Up @@ -1117,7 +1117,7 @@ function product_of_components_with_projection(A::AbstractAssociativeAlgebra, a:
for b in basis(A)
push!(imgs, sum(injstoB[i](injs[i]\b) for i in eachindex(a); init = zero(B)))
end
p = hom(A, B, basis_matrix(imgs))
p = hom(A, B, basis_matrix(imgs); check = false)
_transport_refined_wedderburn_decomposition_forward(p)
return B, p
end
Expand Down
2 changes: 1 addition & 1 deletion src/AlgAss/AlgGrp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ denominator_of_multiplication_table(A::GroupAlgebra{QQFieldElem}) = one(ZZ)

base_ring(A::GroupAlgebra{T}) where {T} = A.base_ring::parent_type(T)

base_ring_type(::Type{GroupAlgebra{T}}) where {T} = parent_type(T)
base_ring_type(::Type{GroupAlgebra{T, S, R}}) where {T, S, R} = parent_type(T)

Generic.dim(A::GroupAlgebra) = size(multiplication_table(A, copy = false), 1)

Expand Down
8 changes: 7 additions & 1 deletion src/AlgAss/AlgMat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@

coefficient_ring(A::MatAlgebra{T, S}) where {T, S} = A.coefficient_ring::base_ring_type(S)

basis(A::MatAlgebra) = A.basis::Vector{elem_type(A)}
function basis(A::MatAlgebra; copy::Bool = true)
if copy
return Base.copy(A.basis::Vector{elem_type(A)})
else
return A.basis::Vector{elem_type(A)}

Check warning on line 21 in src/AlgAss/AlgMat.jl

View check run for this annotation

Codecov / codecov/patch

src/AlgAss/AlgMat.jl#L21

Added line #L21 was not covered by tests
end
end

has_one(A::MatAlgebra) = true

Expand Down
5 changes: 5 additions & 0 deletions src/AlgAss/Elem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,11 @@ function (A::GroupAlgebra)(a::GroupAlgebraElem)
return a
end

function (A::MatAlgebra)(a::MatAlgebraElem)
@assert parent(a) == A "Wrong parent"
return a
end

# For polynomial substitution
for T in subtypes(AbstractAssociativeAlgebra)
@eval begin
Expand Down
Loading
Loading