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

denominator for polynomials #1753

Open
SoongNoonien opened this issue Jul 17, 2024 · 0 comments
Open

denominator for polynomials #1753

SoongNoonien opened this issue Jul 17, 2024 · 0 comments

Comments

@SoongNoonien
Copy link
Contributor

I was again playing around with the universal polynomial rings and wondered why there is no denominator function for them. But then I noticed that with plain AbstractAlgebra there is not even a denominator function for univariate or multivariate polynomials:

julia> using AbstractAlgebra

julia> pkgversion(AbstractAlgebra)
v"0.41.9"

julia> R,(x,y)=QQ[:x,:y]
(Multivariate polynomial ring in 2 variables over rationals, AbstractAlgebra.Generic.MPoly{Rational{BigInt}}[x, y])

julia> denominator(1//2*x+1//3*x^2)
ERROR: MethodError: no method matching denominator(::AbstractAlgebra.Generic.MPoly{Rational{BigInt}})

Closest candidates are:
  denominator(::AbstractAlgebra.Generic.RationalFunctionFieldElem, ::Bool)
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/EYoda/src/generic/RationalFunctionField.jl:90
  denominator(::AbstractAlgebra.Generic.RationalFunctionFieldElem)
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/EYoda/src/generic/RationalFunctionField.jl:90
  denominator(::AbstractAlgebra.Generic.TotFrac, ::Bool)
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/EYoda/src/generic/TotalFraction.jl:73
  ...

Stacktrace:
 [1] top-level scope
   @ REPL[3]:1

julia> R,x=QQ[:x]
(Univariate polynomial ring in x over rationals, x)

julia> denominator(1//2*x+1//3*x^2)
ERROR: MethodError: no method matching denominator(::AbstractAlgebra.Generic.Poly{Rational{BigInt}})

Closest candidates are:
  denominator(::AbstractAlgebra.Generic.RationalFunctionFieldElem, ::Bool)
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/EYoda/src/generic/RationalFunctionField.jl:90
  denominator(::AbstractAlgebra.Generic.RationalFunctionFieldElem)
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/EYoda/src/generic/RationalFunctionField.jl:90
  denominator(::AbstractAlgebra.Generic.TotFrac, ::Bool)
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/EYoda/src/generic/TotalFraction.jl:73
  ...

Stacktrace:
 [1] top-level scope
   @ REPL[6]:1

julia> R=universal_polynomial_ring(QQ)
Universal Polynomial Ring over Rationals

julia> x=gen(R,:x)
x

julia> denominator(1//2*x+1//3*x^2)
ERROR: MethodError: no method matching denominator(::AbstractAlgebra.Generic.UnivPoly{Rational{BigInt}, AbstractAlgebra.Generic.MPoly{Rational{BigInt}}})

Closest candidates are:
  denominator(::AbstractAlgebra.Generic.RationalFunctionFieldElem, ::Bool)
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/EYoda/src/generic/RationalFunctionField.jl:90
  denominator(::AbstractAlgebra.Generic.RationalFunctionFieldElem)
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/EYoda/src/generic/RationalFunctionField.jl:90
  denominator(::AbstractAlgebra.Generic.TotFrac, ::Bool)
   @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/EYoda/src/generic/TotalFraction.jl:73
  ...

Stacktrace:
 [1] top-level scope
   @ REPL[10]:1

julia> 

In all of these cases I would expect a value of 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant