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

Rename jacobi_matrix to jacobian_matrix #3180

Merged
merged 3 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion experimental/PlaneCurve/docs/src/non_plane_curves.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ in(P::Oscar.Geometry.ProjSpcElem, C::ProjCurve)
curve_components(C::ProjCurve)
is_irreducible(C::ProjCurve)
reduction(C::ProjCurve)
jacobi_ideal(C::ProjCurve)
jacobian_ideal(C::ProjCurve)
invert_birational_map(phi::Vector{T}, C::ProjCurve) where {T <: MPolyRingElem}
```
2 changes: 1 addition & 1 deletion experimental/PlaneCurve/docs/src/plane_curves.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ geometric_genus(C::AffinePlaneCurve)
## Smoothness, tangents and singularity related functions

```@docs
jacobi_ideal(C::Oscar.PlaneCurveModule.PlaneCurve)
jacobian_ideal(C::Oscar.PlaneCurveModule.PlaneCurve)
is_smooth(C::AffinePlaneCurve{S}, P::Point{S}) where S <: FieldElem
is_smooth(C::Oscar.PlaneCurveModule.ProjectivePlaneCurve{S}, P::Oscar.Geometry.ProjSpcElem{S}) where S <: FieldElem
tangent(C::AffinePlaneCurve{S}, P::Point{S}) where S <: FieldElem
Expand Down
8 changes: 4 additions & 4 deletions experimental/PlaneCurve/src/AffinePlaneCurve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
function Oscar.is_smooth(C::AffinePlaneCurve{S}, P::Point{S}) where S <: FieldElem
P.ambient_dim == 2 || error("The point needs to be in a two dimensional space")
iszero(evaluate(C.eq, P.coord)) || error("The point is not on the curve defined by ", C.eq)
J = jacobi_ideal(C)
J = jacobian_ideal(C)
L = gens(J)
a = evaluate(L[1], P.coord)
b = evaluate(L[2], P.coord)
Expand Down Expand Up @@ -80,7 +80,7 @@
function tangent(C::AffinePlaneCurve{S}, P::Point{S}) where S <: FieldElem
P.ambient_dim == 2 || error("The point needs to be in a two dimensional space")
iszero(evaluate(C.eq, P.coord)) || error("The point is not on the curve")
J = jacobi_ideal(C)
J = jacobian_ideal(C)
L = gens(J)
a = evaluate(L[1], P.coord)
b = evaluate(L[2], P.coord)
Expand Down Expand Up @@ -256,7 +256,7 @@
push!(CC, AffinePlaneCurve(g))
end
# Computation of the singular locus of the reduction of C.
J = jacobi_ideal(D)
J = jacobian_ideal(D)
F = D.eq
FX, FY = gens(J)
# The case FX = FY = 0 cannot occur in the reduced case.
Expand Down Expand Up @@ -402,7 +402,7 @@
Return the singular locus of `C` as a variety.
"""
function singular_locus(C::AffinePlaneCurve)
J = jacobi_ideal(C)
J = jacobian_ideal(C)

Check warning on line 405 in experimental/PlaneCurve/src/AffinePlaneCurve.jl

View check run for this annotation

Codecov / codecov/patch

experimental/PlaneCurve/src/AffinePlaneCurve.jl#L405

Added line #L405 was not covered by tests
R = parent(C.eq)
S = ideal(R, [gens(J); C.eq])
return Variety(S)
Expand Down
14 changes: 7 additions & 7 deletions experimental/PlaneCurve/src/PlaneCurve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export hash
export ideal_point
export is_irreducible
export is_reduced
export jacobi_ideal
export jacobian_ideal
export reduction
export ring
export union
Expand Down Expand Up @@ -267,7 +267,7 @@ end
################################################################################

@doc raw"""
jacobi_ideal(C::PlaneCurve)
jacobian_ideal(C::PlaneCurve)

Return the Jacobian ideal of the defining polynomial of `C`.

Expand All @@ -279,12 +279,12 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
julia> C = AffinePlaneCurve(y^3*x^6 - y^6*x^2)
Affine plane curve defined by x^6*y^3 - x^2*y^6

julia> Oscar.jacobi_ideal(C)
julia> Oscar.jacobian_ideal(C)
ideal(6*x^5*y^3 - 2*x*y^6, 3*x^6*y^2 - 6*x^2*y^5)
```
"""
function Oscar.jacobi_ideal(C::PlaneCurve)
return jacobi_ideal(C.eq)
function Oscar.jacobian_ideal(C::PlaneCurve)
return jacobian_ideal(C.eq)
end

################################################################################
Expand Down Expand Up @@ -494,7 +494,7 @@ end
using .PlaneCurveModule

export Point, ideal_point, AffinePlaneCurve, ProjPlaneCurve, hash, degree,
jacobi_ideal, curve_components, is_irreducible, is_reduced, reduction,
jacobian_ideal, curve_components, is_irreducible, is_reduced, reduction,
union, defining_equation, ring, ProjectivePlaneCurve

export is_smooth, tangent, common_components, curve_intersect,
Expand All @@ -503,7 +503,7 @@ export is_smooth, tangent, common_components, curve_intersect,
arithmetic_genus, geometric_genus

export ProjCurve, defining_ideal, curve_components, reduction, is_irreducible,
jacobi_ideal
jacobian_ideal

export parametrization_plane_curve, adjoint_ideal, rational_point_conic,
parametrization_conic, map_to_rational_normal_curve,
Expand Down
10 changes: 5 additions & 5 deletions experimental/PlaneCurve/src/ProjCurve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export ProjCurve
export curve_components
export defining_ideal
export is_irreducible
export jacobi_ideal
export jacobian_ideal
export reduction

import Oscar.defining_ideal
Expand Down Expand Up @@ -187,7 +187,7 @@ end
################################################################################

@doc raw"""
jacobi_ideal(C::ProjCurve)
jacobian_ideal(C::ProjCurve)

Return the Jacobian ideal of the defining ideal of `C`.

Expand All @@ -205,15 +205,15 @@ ideal(x^2, y^2*z, z^2)
julia> C = Oscar.ProjCurve(I)
Projective curve defined by the ideal(x^2, y^2*z, z^2)

julia> Oscar.jacobi_ideal(C)
julia> Oscar.jacobian_ideal(C)
ideal(4*x*y*z, 2*x*y^2, 4*x*z, 4*y*z^2)
```
"""
function Oscar.jacobi_ideal(C::ProjCurve)
function Oscar.jacobian_ideal(C::ProjCurve)
I = defining_ideal(C)
R = base_ring(I)
k = C.ambiant_dim - 1
M = jacobi_matrix(gens(I))
M = jacobian_matrix(gens(I))
V = minors(M, k)
filter!(!iszero, V)
return ideal(R, V)
Expand Down
2 changes: 1 addition & 1 deletion experimental/PlaneCurve/src/ProjEllipticCurve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ end
################################################################################

function is_inflection(F::Oscar.MPolyDecRingElem{S}, P::Oscar.Geometry.ProjSpcElem{S}) where S <: FieldElem
J = jacobi_matrix([jacobi_matrix(F)[i] for i in 1:3])
J = jacobian_matrix([jacobian_matrix(F)[i] for i in 1:3])
H = det(J)
return iszero(evaluate(F, P.v)) && iszero(evaluate(H, P.v))
end
Expand Down
8 changes: 4 additions & 4 deletions experimental/PlaneCurve/src/ProjPlaneCurve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ false
function Oscar.is_smooth(C::ProjectivePlaneCurve{S}, P::Oscar.Geometry.ProjSpcElem{S}) where S <: FieldElem
dim(P.parent) == 2 || error("The point needs to be in a projective two dimensional space")
iszero(evaluate(C.eq, P.v)) || error("The point is not on the curve defined by ", C.eq)
J = jacobi_ideal(C)
J = jacobian_ideal(C)
L = gens(J)
a = evaluate(L[1], P.v)
b = evaluate(L[2], P.v)
Expand Down Expand Up @@ -85,7 +85,7 @@ Projective plane curve defined by -48*x - 48*y
function tangent(C::ProjectivePlaneCurve{S}, P::Oscar.Geometry.ProjSpcElem{S}) where S <: FieldElem
dim(P.parent) == 2 || error("The point needs to be in a projective two dimensional space")
iszero(evaluate(C.eq, P.v)) || error("The point is not on the curve")
J = jacobi_ideal(C)
J = jacobian_ideal(C)
L = gens(J)
a = evaluate(L[1], P.v)
b = evaluate(L[2], P.v)
Expand Down Expand Up @@ -238,7 +238,7 @@ function curve_singular_locus(PP::Oscar.Geometry.ProjSpc{S}, C::ProjectivePlaneC
g = prod(f)
push!(CC, ProjPlaneCurve(g))
end
J = jacobi_ideal(D)
J = jacobian_ideal(D)
FX, FY, FZ = gens(J)
# Computation of the singular locus of the reduction of C.
# With the fact that the equation is now squarefree, only points can appear.
Expand Down Expand Up @@ -300,7 +300,7 @@ Return `true` if `C` has no singular point, and `false` otherwise.
function is_smooth_curve(C::ProjectivePlaneCurve)
F = defining_equation(C)
R = parent(F)
J = jacobi_ideal(F)
J = jacobian_ideal(F)
if dim(J) > 0
return false
else
Expand Down
2 changes: 1 addition & 1 deletion experimental/PlaneCurve/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ end
P = Oscar.Geometry.ProjSpcElem(PP[1], [QQ(0), QQ(2), QQ(0), QQ(5)])
@test P in C
@test PC.is_irreducible(C)
J = PC.jacobi_ideal(C)
J = PC.jacobian_ideal(C)
L = gens(J)
@test length(L) == 4
@test length(findall(a -> a == 4*x*y*z, L)) == 1
Expand Down
8 changes: 4 additions & 4 deletions experimental/Schemes/CoherentSheaves.jl
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,8 @@
(U, V) = patches(G)
(UU, VV) = glueing_domains(G)
(f, g) = glueing_morphisms(G)
MG[(U, V)] = transpose(jacobi_matrix(pullback(g).(gens(OO(UU)))))
MG[(V, U)] = transpose(jacobi_matrix(pullback(f).(gens(OO(VV)))))
MG[(U, V)] = transpose(jacobian_matrix(pullback(g).(gens(OO(UU)))))
MG[(V, U)] = transpose(jacobian_matrix(pullback(f).(gens(OO(VV)))))
end


Expand Down Expand Up @@ -846,7 +846,7 @@
R = OO(X)
P = base_ring(R)
F = FreeMod(R, ["d$(x)" for x in symbols(P)])
rels, _ = sub(F, transpose(change_base_ring(R, jacobi_matrix(base_ring(modulus(R)), gens(modulus(R))))))
rels, _ = sub(F, transpose(change_base_ring(R, jacobian_matrix(base_ring(modulus(R)), gens(modulus(R))))))
M, _ = quo(F, rels)
return M
end
Expand All @@ -855,7 +855,7 @@
R = OO(X)
P = base_ring(R)
F = FreeMod(R, ["d$(x)" for x in symbols(P)])
rels, _ = sub(F, transpose(change_base_ring(R, jacobi_matrix(base_ring(modulus(R)), gens(modulus(R))))))
rels, _ = sub(F, transpose(change_base_ring(R, jacobian_matrix(base_ring(modulus(R)), gens(modulus(R))))))

Check warning on line 858 in experimental/Schemes/CoherentSheaves.jl

View check run for this annotation

Codecov / codecov/patch

experimental/Schemes/CoherentSheaves.jl#L858

Added line #L858 was not covered by tests
M, _ = quo(F, rels)
return M
end
Expand Down
20 changes: 10 additions & 10 deletions experimental/Schemes/CoveredProjectiveSchemes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1187,12 +1187,12 @@ end
# verbose && println("call with $X and $f")
# R = base_ring(OO(X))
# g = gens(modulus(OO(X)))
# Dg = jacobi_matrix(g)
# Dg = jacobian_matrix(g)
# d = dim(X)
# n = nvars(R)
# verbose && println("generators:")
# verbose && println(f)
# verbose && println("jacobian matrix:")
# verbose && println("Jacobian matrix:")
# if verbose
# for i in 1:nrows(Dg)
# println(Dg[i, 1:end])
Expand All @@ -1206,7 +1206,7 @@ end
# verbose && println("proceed with finding a regular sequence on $U")
# g = X_dict[U][2]
# f_ext = vcat(g, f)
# Df_ext = jacobi_matrix(f_ext)
# Df_ext = jacobian_matrix(f_ext)
# good = X_dict[U][3]
# Z = subscheme(U, f)
# d = dim(Z)
Expand All @@ -1233,11 +1233,11 @@ end
#function as_smooth_lci_of_cod(X::Spec, c::Int; check::Bool=true, verbose::Bool=false)
# R = base_ring(OO(X))
# f = gens(modulus(OO(X)))
# Df = jacobi_matrix(f)
# Df = jacobian_matrix(f)
# n = nvars(R)
## verbose && println("generators:")
## verbose && println(f)
## verbose && println("jacobian matrix:")
## verbose && println("Jacobian matrix:")
## if verbose
## for i in 1:nrows(Df)
## println(Df[i, 1:end])
Expand All @@ -1249,11 +1249,11 @@ end
## push!(f_part, sum([(rand(Int)%1000)*g for g in f]))
## end
## @show "first try"
## while !isempty(degeneracy_locus(X, jacobi_matrix(f_part), c, verbose=true))
## while !isempty(degeneracy_locus(X, jacobian_matrix(f_part), c, verbose=true))
## @show "new try"
## push!(f_part, dot([rand(Int)%1000 for j in 1:length(f)], f))
## end
## return _as_smooth_lci_rec(X, X, poly_type(X)[], (Int[], Int[]), Vector{Tuple{Int, Int}}(), f_part, jacobi_matrix(f_part), n-c, n, check=check, verbose=verbose)
## return _as_smooth_lci_rec(X, X, poly_type(X)[], (Int[], Int[]), Vector{Tuple{Int, Int}}(), f_part, jacobian_matrix(f_part), n-c, n, check=check, verbose=verbose)
# return _as_smooth_lci_rec(X, X, poly_type(X)[], (Int[], Int[]), Vector{Tuple{Int, Int}}(), f, Df, Df, n-c, n, check=check, verbose=verbose)
#end
#
Expand All @@ -1271,12 +1271,12 @@ end
#function as_smooth_local_complete_intersection(X::Spec; check::Bool=true, verbose::Bool=false)
# R = base_ring(OO(X))
# f = gens(modulus(OO(X)))
# Df = jacobi_matrix(f)
# Df = jacobian_matrix(f)
# d = dim(X)
# n = nvars(R)
# verbose && println("generators:")
# verbose && println(f)
# verbose && println("jacobian matrix:")
# verbose && println("Jacobian matrix:")
# if verbose
# for i in 1:nrows(Df)
# println(Df[i, 1:end])
Expand Down Expand Up @@ -1672,7 +1672,7 @@ end
#
#function test_cover(C, f, hl, ql, rl, cl)
# n = length(hl)
# Df = jacobi_matrix(f)
# Df = jacobian_matrix(f)
# for i in 1:n
# h = prod(hl[i])
# A = Df[rl[i], cl[i]]
Expand Down
2 changes: 1 addition & 1 deletion experimental/Schemes/IdealSheaves.jl
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ end
# h = vcat(f, g)
# r = length(f)
# s = length(g)
# Dh = jacobi_matrix(h)
# Dh = jacobian_matrix(h)
# (ll, ql, rl, cl) = _non_degeneration_cover(subscheme(U, g), Dh, codimension + codim(U),
# verbose=verbose, check=check,
# restricted_columns=[collect(1:r), [r + k for k in 1:s]])
Expand Down
2 changes: 1 addition & 1 deletion experimental/Schemes/duValSing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function _check_duval_at_point(IX::Ideal,Ipt::Ideal)
kk = base_ring(R)
characteristic(kk) == 0 || error("only available in characteristic zero")

JM = jacobi_matrix(gens(IX))
JM = jacobian_matrix(gens(IX))

smooth = (:A,0)

Expand Down
2 changes: 1 addition & 1 deletion src/AlgebraicGeometry/RationalPoint/AffineRationalPoint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ See also [`tangent_space(P::AbsAffineRationalPoint{<:Field})`](@ref)
"""
function tangent_space(X::AbsSpec{<:Field}, P::AbsAffineRationalPoint)
@req P in X "the point needs to lie on the algebraic set"
J = jacobi_matrix(gens(ambient_closure_ideal(X)))
J = jacobian_matrix(gens(ambient_closure_ideal(X)))
v = coordinates(P)
JP = map_entries(x->evaluate(x, v), J)
V = ambient_coordinates(X)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ function _singular_locus_with_decomposition(X::AbsSpec{<:Field, <:MPAnyQuoRing},
empty = typeof(X)[]
result = empty

# equidimensional decomposition to allow Jacobi criterion on each component
# equidimensional decomposition to allow Jacobian criterion on each component
P = Ideal[]

if has_attribute(X, :is_equidimensional) && is_equidimensional(X) && !reduced
Expand All @@ -764,12 +764,12 @@ function _singular_locus_with_decomposition(X::AbsSpec{<:Field, <:MPAnyQuoRing},
end
end

# if irreducible, just do Jacobi criterion
# if irreducible, just do Jacobian criterion
if length(P)==1 && !reduced
d = dim(X)
R = base_ring(I)
n = nvars(R)
M = _jacobi_matrix_modulus(X)
M = _jacobian_matrix_modulus(X)
minvec = minors(M, n-d)
J = ideal(R, minvec)
JX = ideal(OO(X),minvec)
Expand All @@ -795,11 +795,11 @@ function _singular_locus_with_decomposition(X::AbsSpec{<:Field, <:MPAnyQuoRing},
return result
end

## cheaper version of jacobi_matrix specifically for Jacobi matrix of modulus
## compute *some* representative of the jacobian matrix of gens(modulus),
## cheaper version of jacobian_matrix specifically for Jacobian matrix of modulus
## compute *some* representative of the Jacobian matrix of gens(modulus),
## forgetting about the denominators (contribution killed by modulus anyway)

function _jacobi_matrix_modulus(X::AbsSpec{<:Ring, <:MPAnyQuoRing})
function _jacobian_matrix_modulus(X::AbsSpec{<:Ring, <:MPAnyQuoRing})
g = gens(modulus(underlying_quotient(OO(X))))
L = base_ring(underlying_quotient(OO(X)))
n = nvars(L)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ true
L = localized_ring(OO(X))
I = modulus(OO(X))
f = gens(saturated_ideal(I))
Df = jacobi_matrix(f)
Df = jacobian_matrix(f)
A = map_entries(x->OO(X)(x), Df)
success, _, _ = Oscar._is_projective_without_denominators(A, task=:without_projector)
return success
Expand All @@ -700,7 +700,7 @@ end
R = base_ring(OO(X))
I = modulus(OO(X))
f = gens(I)
Df = jacobi_matrix(f)
Df = jacobian_matrix(f)
A = map_entries(x->OO(X)(x), Df)
success, _, _ = Oscar._is_projective_without_denominators(A, task=:without_projector)
return success
Expand Down
Loading
Loading