Skip to content

Commit

Permalink
Add tensor_product for two GAPGroupClassFunction (oscar-system#3973)
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored Jul 26, 2024
1 parent f2fc3fd commit f5982df
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/src/Groups/group_characters.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ arithmetic operations:
where the group of `chi` is a subgroup of the group of `tbl`.

```@docs
scalar_product
scalar_product(chi::GAPGroupClassFunction, psi::GAPGroupClassFunction)
tensor_product(chi::GAPGroupClassFunction, psi::GAPGroupClassFunction)
coordinates(chi::GAPGroupClassFunction)
multiplicities_eigenvalues
induce(chi::GAPGroupClassFunction, tbl::GAPGroupCharacterTable)
Expand Down
11 changes: 11 additions & 0 deletions src/Groups/group_characters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2405,6 +2405,17 @@ function Base.:*(chi::GAPGroupClassFunction, psi::GAPGroupClassFunction)
return GAPGroupClassFunction(parent(chi), GapObj(chi) * GapObj(psi))
end

"""
tensor_product(chi::GAPGroupClassFunction, psi::GAPGroupClassFunction)
Return the pointwise product of `chi` and `psi`.
The resulting character is afforded by the tensor product of representations
corresponding to `chi` and `psi`, hence the name.
Alias for `chi * psi`.
"""
tensor_product(chi::GAPGroupClassFunction, psi::GAPGroupClassFunction) = chi * psi

function Base.zero(chi::GAPGroupClassFunction)
val = QQAbFieldElem(0)
return class_function(parent(chi), [val for i in 1:length(chi)])
Expand Down
4 changes: 4 additions & 0 deletions test/Groups/group_characters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,8 @@ end
@test sort!([order(center(chi)[1]) for chi in t]) == [1, 1, 4, 24, 24]
@test all(i -> findfirst(==(t[i]), t) == i, 1:nrows(t))

@test all(chi -> chi * chi == tensor_product(chi, chi), t)

scp = scalar_product(t[1], t[1])
@test scp == 1
@test scp isa QQFieldElem
Expand Down Expand Up @@ -1232,6 +1234,8 @@ end
@test all(chi -> order(center(chi)[1]) == n, tbl1)
@test all(chi -> is_subgroup(kernel(chi)[1], G1)[1], tbl1)

@test all(chi -> chi * chi == tensor_product(chi, chi), tbl1)

scp = scalar_product(tbl1[1], tbl1[1])
@test scp == 1
@test scp isa QQFieldElem
Expand Down

0 comments on commit f5982df

Please sign in to comment.