Skip to content

Commit b6ab939

Browse files
committed
fixed a bug in Frobenius.jl
1 parent 1235d2c commit b6ab939

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Frobenius.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,21 @@ function applyFrobeniusToMon(n, d, f, N, p, beta, m, R, PR, termorder,vars_rever
6969
for j in 0:(N-1)
7070
e = j + m
7171
factorial_e = R(ZZ(Factorial//factorial(ZZ(p * e - 1))))
72-
#(9 < verbose) && println("e=$e,factorial_e=$factorial_e")
7372
ev = gen_exp_vec(n+1,d*j,termorder)
7473
fj = f^j
74+
#println("f^j = $fj")
7575
sum = 0
7676
for alpha in ev
7777
B = MPolyBuildCtx(PR)
7878
push_term!(B, R(1),Int64(p) * (beta + alpha + o))
7979
monomial = div(finish(B), X1)
8080
#coefficient = R(factorial_e * (D[j+1] * (coeff(fj,alpha)^p)))
81-
coefficient = R(factorial_e * (D[j+1] * (coeff(fj,alpha)))) # not sure whether there should be a power of p here
81+
coefficient = R(factorial_e * (D[j+1] * (coeff(fj,alpha)))) # needs to act by Frobenius on coeff() if base field is not FF_p
8282
sum = sum + coefficient * monomial
8383
if (9 < verbose) && coefficient != 0
8484
Djm = D[j+1]
8585
C_jalpha = coeff(fj,alpha)
86-
println("Djm=$Djm, C_jalpha=$C_jalpha")
86+
println("Djm=$Djm, C_jalpha=$C_jalpha\n")
8787
end
8888
#(9 < verbose) && coefficient != 0 && println("coefficient=$coefficient, monomial=$monomial")
8989
#println(typeof((D[j+1]*(coeff(map_coefficients(lift,fj),alpha)^p))*monomial))
@@ -124,7 +124,8 @@ function applyFrobeniusToBasis(Basis,f,N_m,p,params)
124124
verbose = params.verbose
125125

126126
n = nvars(parent(f)) - 1
127-
d = degree(f,1)
127+
#d = degree(f,1)
128+
d = total_degree(f)
128129
PR = parent(f)
129130
R = coefficient_ring(parent(f))
130131
result = []

0 commit comments

Comments
 (0)