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

initial() will not take a weight vector in QQ. #4025

Closed
APMS04 opened this issue Aug 19, 2024 · 0 comments · Fixed by #4027
Closed

initial() will not take a weight vector in QQ. #4025

APMS04 opened this issue Aug 19, 2024 · 0 comments · Fixed by #4027
Assignees
Labels
bug Something isn't working

Comments

@APMS04
Copy link

APMS04 commented Aug 19, 2024

Bug found where initial() will not take a QQFieldElem; works instead with Rational{Int}.

Code demonstrating bug:

julia> using Oscar

julia> T = tropical_semiring()
Min tropical semiring

julia> K, t = rational_function_field(QQ, "t")
(Rational function field over QQ, t)

julia> nu = tropical_semiring_map(K, t)
Map into Min tropical semiring encoding the t-adic valuation on Rational function field over QQ

julia> R, (x1, x2, x3) = K["x1", "x2", "x3"]
(Multivariate polynomial ring in 3 variables over K, AbstractAlgebra.Generic.MPoly{AbstractAlgebra.Generic.RationalFunctionFieldElem{QQFieldElem, QQPolyRingElem}}[x1, x2, x3])

julia> initial(x1, nu, Rational{Int}[0, 0, 0])
x1

julia> initial(x1, nu, QQFieldElem[0, 0, 0])
ERROR: Cannot promote to common type
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] promote(x::TropicalSemiringElem{typeof(min)}, y::QQFieldElem)
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/tABFQ/src/NCRings.jl:54
 [3] *(x::TropicalSemiringElem{typeof(min)}, y::QQFieldElem)
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/tABFQ/src/NCRings.jl:80
 [4] (::Oscar.var"#5755#5757"{…})(::Tuple{…})
   @ Oscar ./none:0
 [5] iterate
   @ ./generator.jl:47 [inlined]
 [6] collect
   @ ./array.jl:834 [inlined]
 [7] initial(f::AbstractAlgebra.Generic.MPoly{…}, nu::TropicalSemiringMap{…}, w::Vector{…}; perturbation::Nothing)
   @ Oscar ~/.julia/dev/Oscar/src/TropicalGeometry/initial.jl:57
 [8] initial(f::AbstractAlgebra.Generic.MPoly{…}, nu::TropicalSemiringMap{…}, w::Vector{…})
   @ Oscar ~/.julia/dev/Oscar/src/TropicalGeometry/initial.jl:49
 [9] top-level scope
   @ REPL[10]:1
Some type information was truncated. Use `show(err)` to see complete types.

On-System Oscar version information:

julia> Oscar.versioninfo(full=true)
OSCAR version 1.2.0-DEV - #master, 2008cc6413 -- 2024-08-13 20:56:24 +0200
  combining:
    AbstractAlgebra.jl   v0.42.0
    GAP.jl               v0.10.4
    Hecke.jl             v0.33.2
    Nemo.jl              v0.46.0
    Polymake.jl          v0.11.20
    Singular.jl          v0.23.4
  building on:
    FLINT_jll               v300.100.300+0
    GAP_jll                 v400.1200.200+9
    Singular_jll            v404.0.301+0
    libpolymake_julia_jll   v0.12.1+0
    libsingular_julia_jll   v0.45.2+0
    polymake_jll            v400.1200.1+0
See `]st -m` for a full list of dependencies.

Julia Version 1.10.4
Commit 48d4fd48430 (2024-06-04 10:41 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
Official https://julialang.org/ release

@APMS04 APMS04 added the bug Something isn't working label Aug 19, 2024
@APMS04 APMS04 changed the title Initial() will not take a weight vector in QQ. initial will not take a weight vector in QQ. Aug 19, 2024
@APMS04 APMS04 changed the title initial will not take a weight vector in QQ. initial() will not take a weight vector in QQ. Aug 19, 2024
@YueRen YueRen self-assigned this Aug 19, 2024
YueRen added a commit that referenced this issue Aug 19, 2024
benlorenz added a commit that referenced this issue Aug 20, 2024
* TropicalGeometry: fixes initial issue

#4025

* TropicalGeometry: allow point_vector as input for initial

* TropicalGeometry: removing unused optional perturbation input

* Update src/TropicalGeometry/initial.jl

Co-authored-by: Benjamin Lorenz <benlorenz@users.noreply.github.com>

---------

Co-authored-by: Benjamin Lorenz <benlorenz@users.noreply.github.com>
HechtiDerLachs pushed a commit to HechtiDerLachs/Oscar.jl that referenced this issue Sep 13, 2024
* TropicalGeometry: fixes initial issue

oscar-system#4025

* TropicalGeometry: allow point_vector as input for initial

* TropicalGeometry: removing unused optional perturbation input

* Update src/TropicalGeometry/initial.jl

Co-authored-by: Benjamin Lorenz <benlorenz@users.noreply.github.com>

---------

Co-authored-by: Benjamin Lorenz <benlorenz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants