Skip to content

Commit

Permalink
Make it work
Browse files Browse the repository at this point in the history
  • Loading branch information
joschmitt committed Feb 16, 2024
1 parent 6554d13 commit 52ce820
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/BinomIdeal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/BinomIdeal2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion experimental/Schemes/DerivedPushforward.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions src/TropicalGeometry/variety.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 52ce820

Please sign in to comment.