Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hasse-Schmidt derivatives #3912

Closed
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
15962fc
initial setup
KilianBruns May 13, 2024
344688c
hasse_deriv for Rloc and RQ
KilianBruns May 24, 2024
1237dfd
hasse_deriv finished for MPolyLocRing and MPolyQuoRing
KilianBruns May 31, 2024
f020927
hasse_derivatives for MPolyElem finished
KilianBruns May 31, 2024
37bf2d3
Foundation for Hasse Derivatives for Polynomials
KilianBruns May 31, 2024
fdaa169
Examples for RQ, Rloc and RQL
KilianBruns Jun 5, 2024
16d75de
HSD for RQL rings working
KilianBruns Jun 18, 2024
f8f2705
Merge branch 'oscar-system:master' into kb/hasse_schmidt_derivatives
KilianBruns Jun 18, 2024
52bcd94
updating newest Oscar version
KilianBruns Jun 19, 2024
6a8fdb9
Merge branch 'kb/hasse_schmidt_derivatives' of https://github.com/Kil…
KilianBruns Jun 19, 2024
8428119
added several documentation
KilianBruns Jun 19, 2024
7049c90
tests for hasse_derivatives
KilianBruns Jun 28, 2024
78245db
more tests, problem with types of elemets of vector
KilianBruns Jul 2, 2024
7b98211
test for every function, type problem avoided for now
KilianBruns Jul 3, 2024
22b3e59
removed some comments
KilianBruns Jul 4, 2024
24292fb
Merge branch 'oscar-system:master' into kb/hasse_schmidt_derivatives
KilianBruns Jul 4, 2024
4403f50
pull ready
KilianBruns Jul 4, 2024
c1f2975
Merge branch 'kb/hasse_schmidt_derivatives' of https://github.com/Kil…
KilianBruns Jul 4, 2024
df1b725
added folders 'src' and 'test'
KilianBruns Jul 4, 2024
8d54ae5
implemented changes suggested in comments (multiindices, tests in GF(…
KilianBruns Jul 11, 2024
9b0cb6d
changed the structure to how it's stated at https://docs.oscar-system…
KilianBruns Jul 16, 2024
e1ae429
changed @test to right syntax (added variables for clarity)
KilianBruns Jul 18, 2024
4e269bb
added "Oscar." infront of every "_hasse_derivatives"
KilianBruns Jul 18, 2024
47b4b09
removed "Oscar." again from "_hasse_derivatives" in HasseSchmidt.jl
KilianBruns Jul 19, 2024
9a4bca6
now defining elements f via maps given by definition of Quo- and Loc-…
KilianBruns Jul 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
hasse_deriv finished for MPolyLocRing and MPolyQuoRing
KilianBruns committed May 31, 2024
commit 1237dfd5d30fda3872faa6cd4e27e1d93b67041f
33 changes: 23 additions & 10 deletions src/AlgebraicGeometry/HasseSchmidt/HasseSchmidtDerivative.jl
Original file line number Diff line number Diff line change
@@ -42,8 +42,8 @@ function pseudo_diff(f, j, A, q, I::Ideal, systemOfParameters::Vector{Int})
end

# See formular in remark 4.2
for k in 1:n_cols(A)
for l in 1:n_rows(A)
for k in 1:ncols(A)
for l in 1:nrows(A)
SubPoly = derivative(gens(I)[l], systemOfParameters[j]) * A[l,k] * derivative(f, OtherVars[k])
RetPoly = RetPoly - SubPoly
end
@@ -66,12 +66,6 @@ function integer_generator(I)
return (J)
end



# function hasse_deriv(f) # Hs-derivative for one polynomial

# end

####################################################################################
##################### HASSE-SCHMIDT DERIVATIVE (IZ == <0>) #####################
# Name: hasse_deriv
@@ -97,6 +91,7 @@ function hasse_deriv(IX::MPolyQuoIdeal)
end

function hasse_deriv(IX::Oscar.MPolyLocalizedIdeal)
# Rloc.(I.gens)
Rloc = base_ring(IX)
R = base_ring(Rloc) # could cause problems if this isn't a MPolyRing
# projecting the generators of IX onto the base_ring of Rloc by taking the numerators
@@ -159,10 +154,28 @@ end
# OUTPUT: List of ideals generated by hasse derivatives until but without <1>

function hasse_deriv(IZ::MPolyQuoIdeal, IX::MPolyQuoIdeal, systemOfParameters::Vector{Int}, M)
RQ = base_ring(IX)
R = base_ring(RQ) # could cause problems if this isn't a MPolyRing
# embedding the generators of IX and IZ into the base_ring of RQ
IX_R = ideal(R, [R(gen) for gen in gens(IX)])
IZ_R = ideal(R, [R(gen) for gen in gens(IZ)])

# systemOfParameters needs no change because it beeing Vector{Int} ist just fine
nRows = n_rows(M)
nCols = n_columns(M)
M_R = matrix(R, nRows, nCols, [R(M[i,j]) for i in 1:nRows for j in 1:nCols])

list_IX_derivs = hasse_deriv(IZ_R, IX_R, systemOfParameters, M_R) # calling hasse_deriv for MPolyIdeals

# projecting the hasse derivs onto original localized ring
return_list = empty([])
for i in 1:length(list_IX_derivs)
push!(return_list, ideal(Rloc, [Rloc(gen) for gen in gens(list_IX_derivs[i])]))
end
return return_list
end

function hasse_deriv(IZ::Oscar.MPolyLocalizedIdeal, IX::Oscar.MPolyLocalizedIdeal, systemOfParameters, M)
function hasse_deriv(IZ::Oscar.MPolyLocalizedIdeal, IX::Oscar.MPolyLocalizedIdeal, systemOfParameters::Vector{Int}, M)
Rloc = base_ring(IX)
R = base_ring(Rloc) # could cause problems if this isn't a MPolyRing
# projecting the generators of IX and IZ onto the base_ring of Rloc by taking the numerators
@@ -176,7 +189,7 @@ function hasse_deriv(IZ::Oscar.MPolyLocalizedIdeal, IX::Oscar.MPolyLocalizedIdea
nCols = n_columns(M)
M_R = matrix(R, nRows, nCols, [numerator(M[i,j]) for i in 1:nRows for j in 1:nCols])

list_IX_derivs = hasse_deriv(IZ_R, IX_R) # calling hasse_deriv for MPolyIdeals
list_IX_derivs = hasse_deriv(IZ_R, IX_R, systemOfParameters, M_R) # calling hasse_deriv for MPolyIdeals

# embedding the hasse derivs into original localized ring
return_list = empty([])
21 changes: 21 additions & 0 deletions src/AlgebraicGeometry/HasseSchmidt/examplesHasseSchmidt.jl
Original file line number Diff line number Diff line change
@@ -81,8 +81,28 @@ IX = IZ + ideal(R, [x[4]^3 + x[6]^4]) # working
hasse_deriv(IZ, IX, y, M)

### FAKTORRING / QUOTIENTENRING
R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
I = ideal(R, [x - 1])
RQ, _ = quo(R, I)
IZ = ideal(RQ, [y - 1])
IX = IZ + ideal(RQ, [-y^3 + x^2])
systemOfParameters = [3]
M = matrix(RQ, 1, 1, [z])

hasse_deriv(IZ, IX, systemOfParameters, M) # debuggen (endlosschleife), ? x-1 und y-1 sorgen für IX = 0 in RQ ?
# sollte ich auf IX = 0 prüfen? wo prüfe ich bisher auf IX = 0 ? kommt hasse_deriv mit IX = 0 nicht klar?

### LOKALISIERTER RING
R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
P = ideal(R, [x])
U = complement_of_prime_ideal(P)
Rloc, iota = localization(R, U)
IZ = ideal(Rloc, [y - 1])
IX = IZ + ideal(Rloc, [-y^3 + x^2])
systemOfParameters = [1, 3]
M = matrix(Rloc, 1, 1, [z])

hasse_deriv(IZ, IX, systemOfParameters, M)

# Oscar.MPolyLocalizedIdeal
R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
@@ -92,6 +112,7 @@ Rloc, iota = localization(R, U)
IZ = ideal(Rloc, [zero(Rloc)])
IX = ideal(Rloc, [-y^3 + x^2])


# MPolyQuoIdeal
# T, t = polynomial_ring(QQ, "t")
# K, a = number_field(2*t^2-1, "a")