Skip to content

Commit

Permalink
Sets poly ring caching to false for invariant theory (#3864)
Browse files Browse the repository at this point in the history
  • Loading branch information
ederc authored Jun 17, 2024
1 parent b1cc9b7 commit 8a1076f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/InvariantTheory/affine_algebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function relations_primary_and_irreducible_secondary(RG::FinGroupInvarRing)
np = length(p_invars)

w = append!([total_degree(f) for f in p_invars], [total_degree(f) for f in is_invars])
S, t = graded_polynomial_ring(K, "t" => 1:(np + length(is_invars)), w)
S, t = graded_polynomial_ring(K, "t" => 1:(np + length(is_invars)), w; cached=false)

if isempty(is_invars)
I = ideal(S, elem_type(S)[])
Expand Down
9 changes: 6 additions & 3 deletions src/InvariantTheory/fundamental_invariants.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ function fundamental_invariants_via_king(RG::FinGroupInvarRing, beta::Int=0)
invars_cache.invars = [inv(AbstractAlgebra.leading_coefficient(f)) * f for f in polys_ext]
invars_cache.via_primary_and_secondary = false
invars_cache.S = graded_polynomial_ring(
coefficient_ring(R), ["y$i" for i in 1:length(S)], [total_degree(f) for f in S]
coefficient_ring(R), ["y$i" for i in 1:length(S)], [total_degree(f) for f in S];
cached=false,
)[1]
return invars_cache
end
Expand Down Expand Up @@ -174,7 +175,8 @@ function fundamental_invariants_via_primary_and_secondary(IR::FinGroupInvarRing)
invars_cache.S = graded_polynomial_ring(
K,
["y$i" for i in 1:length(invars_cache.invars)],
[total_degree(forget_grading(f)) for f in invars_cache.invars],
[total_degree(forget_grading(f)) for f in invars_cache.invars];
cached=false,
)[1]
invars_cache.toS = Dict{elem_type(R),elem_type(invars_cache.S)}(
invars_cache.invars[i] => gen(invars_cache.S, i) for
Expand Down Expand Up @@ -202,7 +204,8 @@ function fundamental_invariants_via_primary_and_secondary(IR::FinGroupInvarRing)
# Bookkeeping: we need to transform the relations in rels to the new ordering
# (and potentially less variables)
T, _ = graded_polynomial_ring(
K, ["y$i" for i in 1:length(res)], [total_degree(forget_grading(x)) for x in res]
K, ["y$i" for i in 1:length(res)], [total_degree(forget_grading(x)) for x in res];
cached=false,
)

invars_cache.invars = res
Expand Down

0 comments on commit 8a1076f

Please sign in to comment.