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

TropicalGeometry: fixed initials w.r.t. t-adic valuation #4040

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

YueRen
Copy link
Member

@YueRen YueRen commented Aug 22, 2024

Fixes the following error (old code tried to convert elements of the rational function field with denominator 1 to the coefficient field, their numerators should be evaluated at 0 instead):

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> initial(1+t,nu)
ERROR: InexactError: QQFieldElem(t + 1)
Stacktrace:
 [1] (::QQField)(x::AbstractAlgebra.Generic.FracFieldElem{QQPolyRingElem})
   @ Oscar ~/.julia/dev/Oscar/src/Rings/FunctionField.jl:71
 [2] QQField
   @ ~/.julia/dev/Oscar/src/Rings/FunctionField.jl:76 [inlined]
 [3] initial(c::AbstractAlgebra.Generic.RationalFunctionFieldElem{…}, nu::TropicalSemiringMap{…})
   @ Oscar ~/.julia/dev/Oscar/src/TropicalGeometry/semiring_map.jl:257
 [4] top-level scope
   @ REPL[291]:1
Some type information was truncated. Use `show(err)` to see complete types.

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.58%. Comparing base (61bf7dc) to head (481ace5).
Report is 21 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4040   +/-   ##
=======================================
  Coverage   84.58%   84.58%           
=======================================
  Files         597      597           
  Lines       82265    82265           
=======================================
  Hits        69587    69587           
  Misses      12678    12678           
Files with missing lines Coverage Δ
src/TropicalGeometry/semiring_map.jl 97.22% <100.00%> (ø)

Copy link
Collaborator

@VictoriaSchleis VictoriaSchleis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@joschmitt joschmitt merged commit 43ab57b into master Aug 30, 2024
29 checks passed
@joschmitt joschmitt deleted the yr/initial branch August 30, 2024 09:32
HechtiDerLachs pushed a commit to HechtiDerLachs/Oscar.jl that referenced this pull request Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants