From 52ce82035a461438584f1e450f59aacf54f403eb Mon Sep 17 00:00:00 2001 From: Johannes Schmitt Date: Thu, 15 Feb 2024 10:23:43 +0100 Subject: [PATCH] Make it work --- examples/BinomIdeal.jl | 2 +- examples/BinomIdeal2.jl | 2 +- experimental/Schemes/DerivedPushforward.jl | 2 +- .../ToricVarieties/NormalToricVarieties/toric_ideal.jl | 1 - src/TropicalGeometry/variety.jl | 8 ++++---- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/examples/BinomIdeal.jl b/examples/BinomIdeal.jl index 620d17b06878..8e0f5333bde6 100644 --- a/examples/BinomIdeal.jl +++ b/examples/BinomIdeal.jl @@ -695,7 +695,7 @@ argument, so we make an array prodDeltaC, push to it, then splice it in uv=matrixFromArray(u-v) #this is the vector of u-v vst=transpose(vs) vstMat=matrix(FlintZZ,size(vst,1), size(vst,2),vst) - if(can_solve(transpose(vstMat),uv)[1]==false) + if(can_solve(transpose(vstMat),uv)==false) images=[images; nemo(-lead_coeff(tCopy))] #we have to save u-v as generator for the lattice #now concatenate the vector vs on bottom of the matrix vs diff --git a/examples/BinomIdeal2.jl b/examples/BinomIdeal2.jl index e3147c006d87..18b3100d1fad 100644 --- a/examples/BinomIdeal2.jl +++ b/examples/BinomIdeal2.jl @@ -700,7 +700,7 @@ argument, so we make an array prodDeltaC, push to it, then splice it in uv=matrixFromArray(u-v) #this is the vector of u-v vst=transpose(vs) vstMat=matrix(FlintZZ,size(vst,1), size(vst,2),vst) - if(can_solve(transpose(vstMat),uv)[1]==false) + if(can_solve(transpose(vstMat),uv)==false) images=[images; nemo(-lead_coeff(tCopy))] #we have to save u-v as generator for the lattice #now concatenate the vector vs on bottom of the matrix vs diff --git a/experimental/Schemes/DerivedPushforward.jl b/experimental/Schemes/DerivedPushforward.jl index 0d0de215ab1e..e6604acf1aa5 100644 --- a/experimental/Schemes/DerivedPushforward.jl +++ b/experimental/Schemes/DerivedPushforward.jl @@ -75,7 +75,7 @@ end =# function rank(phi::FreeModuleHom{FreeMod{T}, FreeMod{T}, Nothing}) where {T<:FieldElem} - return ngens(domain(phi)) - kernel(sparse_matrix(phi), side = :left) + return ngens(domain(phi)) - nrows(kernel(sparse_matrix(phi), side = :left)) end diff --git a/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/toric_ideal.jl b/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/toric_ideal.jl index b879ec44ba9d..0b6327433a09 100644 --- a/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/toric_ideal.jl +++ b/src/AlgebraicGeometry/ToricVarieties/NormalToricVarieties/toric_ideal.jl @@ -107,7 +107,6 @@ Ideal generated by """ function toric_ideal(R::MPolyRing, pts::ZZMatrix) intkernel = kernel(pts, side=:left) - intkernel = intkernel[2] presat = binomial_exponents_to_ideal(R, intkernel) J = ideal([prod(gens(base_ring(presat)))]) return saturation(presat, J) diff --git a/src/TropicalGeometry/variety.jl b/src/TropicalGeometry/variety.jl index c49456d482bc..9bf08072344b 100644 --- a/src/TropicalGeometry/variety.jl +++ b/src/TropicalGeometry/variety.jl @@ -260,7 +260,7 @@ function tropical_variety_binomial(I::MPolyIdeal,nu::TropicalSemiringMap; weight # Constructing tropical variety set-theoretically ### A = QQMatrix(A) - L = kernel(A, side = :right) + L = transpose(kernel(A, side = :right)) can_solve, V = can_solve_with_solution(transpose(A),matrix(QQ,[b]),side=:left) @req can_solve "tropical variety cannot be empty" SigmaV = polyhedral_complex(IncidenceMatrix([[1]]), V, nothing, L) @@ -456,7 +456,7 @@ function slope_eigenspace(M::MatElem{T}) where T <: Hecke.NonArchLocalFieldElem zk = maximal_order(k) for f = keys(lf) - se[f] = kernel(f(M))[2] #hopefully, this is in rref + se[f] = kernel(f(M), side = :right) #hopefully, this is in rref end @assert sum(ncols(x) for x = values(se)) == nrows(M) return se @@ -473,8 +473,8 @@ function _intersect(M::MatElem{T}, N::MatElem{T}) where T <: Hecke.FieldElem end end - r, v = kernel(I) #precision issues... - l = M*v[1:ncols(M), 1:r] + v = kernel(I, side = :right) #precision issues... + l = M*v[1:ncols(M), 1:ncols(v)] return transpose(rref(transpose(l))[2]) end