Giter VIP home page Giter VIP logo

Comments (6)

sumiya11 avatar sumiya11 commented on July 21, 2024

Hi @KenZhenLin ,

Thanks for reporting this. You are correct, groebner should always return a reduced basis, and it clearly fails in this case.

However, here, the situation is a bit subtle: groebner tries to return polynomials in the same type as they were given in the input.

system has Int coefficients. It is not possible to construct the reduced basis and preserve the type, so it chooses a normalization where denominators are equal to 1.

The current situation is not ideal.
It would perhaps make sense to return polynomials with rational numbers as coefficients here. Hmm..

from groebner.jl.

sumiya11 avatar sumiya11 commented on July 21, 2024

To illustrate what I mean consider this:

@polyvar x1 x2
system = [10*x1*x2^2 - 11*x1 + 10,
        10*x1^2*x2 - 11*x2 + 10 // 1]

groebner(system)

3-element Vector{Polynomial{DynamicPolynomials.Commutative{DynamicPolynomials.CreationOrder}, Graded{LexOrder}, Rational{Int64}}}:
 10//11x2 - 10//11x1 - x2² + x1²
 1//1 - 11//10x2 - 10//11x2² + 10//11x1x2 + x2³
 1//1 - 11//10x1 + x1x2²

But you are right, this behavior seems questionable to me. Also the example in the documentation could be updated.

from groebner.jl.

KenZhenLin avatar KenZhenLin commented on July 21, 2024

@sumiya11 Thanks for your answer! It makes sense to me!

I tried that documentation example and indeed it returned the same results as in the documentation. To make sure I understand your point: groebner returns the unique reduced Gröbner bases, but up to the multiplication by some nonzero constant, is that right?

from groebner.jl.

sumiya11 avatar sumiya11 commented on July 21, 2024

To make sure I understand your point: groebner returns the unique reduced Gröbner bases, but up to the multiplication by some nonzero constant, is that right?

Yes.

For now, to get a trully reduced basis with DynamicPolynomials.jl, you can make polynomial coefficients rational, as in my example above.

from groebner.jl.

KenZhenLin avatar KenZhenLin commented on July 21, 2024

For now, to get a trully reduced basis with DynamicPolynomials.jl, you can make polynomial coefficients rational, as in my example above.

I see, that's a good way!
I do have some codes for which it's better not to change the type, so if I do not make it rational, the groebner will give me the reduced Gröbner bases or the reduced Gröbner bases multiplied by a nonzero constant, correct?

Thanks!

from groebner.jl.

sumiya11 avatar sumiya11 commented on July 21, 2024

so if I do not make it rational, the groebner will give me the reduced Gröbner bases or the reduced Gröbner bases multiplied by a nonzero constant, correct?

Yep !

EDIT: and this constant may be different for each polynomial in the basis.
Is this sufficient for your application at the moment ?

from groebner.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.