Skip to content

Commit

Permalink
Merge branch 'Dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianMaeurer committed Mar 15, 2024
2 parents 51dbaac + b9467c4 commit 5b51adf
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 51 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TensorCategories"
uuid = "258c694e-7338-4d4d-b524-4851272a75cf"
authors = ["Fabian Mäurer"]
version = "0.2.2"
version = "0.2.3"

[deps]
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
Expand Down
74 changes: 29 additions & 45 deletions src/CategoryFramework/AbstractMethods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,37 +152,17 @@ function decompose_by_endomorphism_ring(X::Object, E = End(X))
_images = [image(f)[1] for f idems]

# Check for matrix algebras
images = []
for x _images
H = End(x)
R = endomorphism_ring(x, H)
d = dim(R)
if is_squarefree(d) || is_commutative(R)
push!(images, x)
continue
end

G = gens(R)

if maximum(degree.(minpoly.(G))) == d
push!(images, x)
continue
end

y,k = _simple_end_as_matrix_algebra(x, H)
push!(images,[y for _ 1:k]...)
end


images = [_decompose_by_simple_endomorphism_ring(i) for i _images]


tuples = Tuple{typeof(X), Int}[]

for Y images
for (Y,k) images
i = findfirst(Z -> is_isomorphic(Z[1],Y)[1], tuples)
if i === nothing
push!(tuples, (Y,1))
push!(tuples, (Y,k))
else
tuples[i] = (Y, tuples[i][2] + 1)
tuples[i] = (Y, tuples[i][2] + k)
end
end

Expand Down Expand Up @@ -319,29 +299,33 @@ function minpoly(f::Morphism)
end
end

function _simple_end_as_matrix_algebra(X::Object, E = End(X))

B = gens(E)

if length(B) == 1 return (X,1) end

for f B
eig_spaces = eigenvalues(f)
if length(eig_spaces) == 0
continue

elseif length(eig_spaces) == 1 && dim(collect(values(eig_spaces))[1]) == dim(X)
continue
end


return (collect(values(eig_spaces))[1], length(eig_spaces))
function _decompose_by_simple_endomorphism_ring(X::Object, E = End(X))
K = base_ring(X)
R = endomorphism_ring(X, E)
CR,_ = center(R)
dR = dim(R)
if !is_square(div(dR,dim(CR))) || is_commutative(R)
return (X,1)
end

G = basis(E)

if is_simple(X)
return (X,1)
n,_ = size(matrix(G[1]))
mats = matrix.(G)

for i 1:n
m = matrix(K,n,length(G), hcat([M[i,:] for M mats]...))

d,N = nullspace(m)

if d > 0
Y,y = kernel(sum(collect(N[:,1]) .* G))
Z,k = _decompose_by_simple_endomorphism_ring(Y, End(Y))
return (Z, sqrt(dR // int_dim(End(Z))))
end
end
error("Could not decompose")

return (X,1)
end


Expand Down
7 changes: 7 additions & 0 deletions src/Examples/Haagerup/HaagerupH3.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ function HaagerupH3(K::Field = QQ; p1 = 1, p2 = 1)

r13 = sqrt(K(13))

try
sqrt(6*(1 + r13))
sqrt((-3 + r13)//2)
catch
r13 = -r13
end

H = SixJCategory(K,["𝟙", "α", "α∗", "ρ", "αρ", "α∗ρ"])

mult = Array{Int,3}(undef,6,6,6)
Expand Down
6 changes: 4 additions & 2 deletions src/Examples/TambaraYamagami/TambaraYamagami.jl
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,12 @@ end
Ising()
Construct the Ising category over ``ℚ̅``.
Construct the Ising category over ``ℚ(√2)``.
"""
function Ising()
Ising(QQBar, sqrt(QQBar(2)), 1)
_,x = QQ[:x]
K,r2 = number_field(x^2-2, "√2")
Ising(K, r2, 1)
end

"""
Expand Down
3 changes: 2 additions & 1 deletion src/TensorCategories.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ import Oscar: +, @alias, @attributes, AbstractSet, AcbField, StructureConstantAl
set_attribute!, size, solve, sparse_matrix, splitting_field,
stabilizer, sub, subst, symbols, symmetric_group, tensor_power, tensor_product, tr,
trivial_subgroup, unit, zero, zero_matrix, , , , AbsSimpleNumField,
number_of_rows, number_of_columns, is_squarefree, is_commutative, gens
number_of_rows, number_of_columns, is_squarefree, is_commutative,
gens, center

import Graphs: SimpleDiGraph, weakly_connected_components,
SimpleGraph,connected_components
Expand Down
13 changes: 11 additions & 2 deletions src/TensorCategoryFramework/Center/Center.jl
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ end
function simples_by_induction!(C::CenterCategory, log = true)
S = CenterObject[]
d = dim(C.category)^2

C.induction_gens = object_type(category(C))[]
simpls = simples(C.category)

FI_simples = []
Expand Down Expand Up @@ -1166,7 +1166,16 @@ end
function extension_of_scalars(C::CenterCategory, L::Field)
CL = _extension_of_scalars(C,L, category(C)L)

CL.simples = vcat([indecomposable_subobjects(extension_of_scalars(s, L, CL)) for s simples(C)]...)
CL.simples = vcat([[x for (x,_) decompose(extension_of_scalars(s, L, CL))] for s simples(C)]...)

if isdefined(C, :inductions)
CL.inductions = Dict(extension_of_scalars(x, L, category(CL)) =>
extension_of_scalars(Ix, L, CL) for (x,Ix) C.inductions)
end

if isdefined(C, :induction_gens)
CL.induction_gens = [extension_of_scalars(is, L, category(CL)) for is C.induction_gens]
end

return CL
end
Expand Down

0 comments on commit 5b51adf

Please sign in to comment.