|
79 | 79 |
|
80 | 80 | function shared_categories_fusion_rule(shared1, shared2) |
81 | 81 | fused = map(fusion_rule, values(shared1), values(shared2)) |
82 | | - factorized = factorize_gradedaxes(fused) |
83 | | - type_fixed = recover_category_product_type(typeof(shared1), factorized) |
84 | | - return type_fixed |
| 82 | + return recover_style(typeof(shared1), fused) |
85 | 83 | end |
86 | 84 |
|
87 | | -# abelian case: there is no gradedaxis |
88 | | -factorize_gradedaxes(fused::Tuple{Vararg{AbstractCategory}}) = fused |
| 85 | +function recover_style(T::Type, fused) |
| 86 | + style = reduce(combine_styles, SymmetryStyle.(fused); init=AbelianStyle()) |
| 87 | + return recover_category_product_type(style, T, fused) |
| 88 | +end |
89 | 89 |
|
90 | | -# non-abelian case |
91 | | -function factorize_gradedaxes(fused::Tuple) |
92 | | - # here fused contains at least one GradedOneTo |
93 | | - g0 = reduce(×, fused) |
| 90 | +function recover_category_product_type(::AbelianStyle, T::Type, fused) |
| 91 | + return recover_category_product_type(T, fused) |
| 92 | +end |
| 93 | + |
| 94 | +function recover_category_product_type(::NotAbelianStyle, T::Type, fused) |
| 95 | + factorized = reduce(×, fused) |
94 | 96 | # convention: keep unsorted blocklabels as produced by F order loops in × |
95 | | - return g0 |
| 97 | + type_fixed = recover_category_product_type(T, factorized) |
| 98 | + return type_fixed |
96 | 99 | end |
97 | 100 |
|
98 | 101 | function recover_category_product_type(T::Type, g0::AbstractGradedUnitRange) |
|
0 commit comments