From 53175f65c1927a9f00ab50b45f22dc86e88c382c Mon Sep 17 00:00:00 2001 From: fabianmaeurer Date: Fri, 15 Mar 2024 14:50:02 +0100 Subject: [PATCH 1/2] fixes --- Project.toml | 2 +- src/CategoryFramework/AbstractMethods.jl | 74 ++++++++----------- src/Examples/Haagerup/HaagerupH3.jl | 7 ++ .../TambaraYamagami/TambaraYamagami.jl | 6 +- src/TensorCategories.jl | 3 +- src/TensorCategoryFramework/Center/Center.jl | 13 +++- 6 files changed, 54 insertions(+), 51 deletions(-) diff --git a/Project.toml b/Project.toml index 5f3e426..ecf8941 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "TensorCategories" uuid = "258c694e-7338-4d4d-b524-4851272a75cf" authors = ["Fabian Mäurer"] -version = "0.2.1" +version = "0.2.2" [deps] Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" diff --git a/src/CategoryFramework/AbstractMethods.jl b/src/CategoryFramework/AbstractMethods.jl index 7e85bf3..65196b6 100644 --- a/src/CategoryFramework/AbstractMethods.jl +++ b/src/CategoryFramework/AbstractMethods.jl @@ -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 @@ -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 diff --git a/src/Examples/Haagerup/HaagerupH3.jl b/src/Examples/Haagerup/HaagerupH3.jl index f70ada5..ec7247c 100644 --- a/src/Examples/Haagerup/HaagerupH3.jl +++ b/src/Examples/Haagerup/HaagerupH3.jl @@ -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) diff --git a/src/Examples/TambaraYamagami/TambaraYamagami.jl b/src/Examples/TambaraYamagami/TambaraYamagami.jl index 2969940..3368509 100644 --- a/src/Examples/TambaraYamagami/TambaraYamagami.jl +++ b/src/Examples/TambaraYamagami/TambaraYamagami.jl @@ -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 """ diff --git a/src/TensorCategories.jl b/src/TensorCategories.jl index 4b6815f..14f43d9 100644 --- a/src/TensorCategories.jl +++ b/src/TensorCategories.jl @@ -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 diff --git a/src/TensorCategoryFramework/Center/Center.jl b/src/TensorCategoryFramework/Center/Center.jl index 5cd0053..b8744e8 100644 --- a/src/TensorCategoryFramework/Center/Center.jl +++ b/src/TensorCategoryFramework/Center/Center.jl @@ -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 = [] @@ -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 From b9467c45db40978fcb93128bc2351809354c98a3 Mon Sep 17 00:00:00 2001 From: fabianmaeurer Date: Fri, 15 Mar 2024 14:50:35 +0100 Subject: [PATCH 2/2] v0.2.3 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index ecf8941..26e5a58 100644 --- a/Project.toml +++ b/Project.toml @@ -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"