Zulip Chat Archive
Stream: new members
Topic: Rational functions
Benjamin (Dec 12 2024 at 14:28):
I am trying to write an algorithm in Lean that works with rational functions in two variables with integer coefficients. How can I represent such an object in Lean in a computable way? Does taking the FractionRing of a Polynomial work? And are there any differences between Polynomial and MvPolynomial that are relevant here?
Benjamin (Dec 12 2024 at 14:29):
(I didn't realize I was replying to an old thread when I wrote this.)
Ruben Van de Velde (Dec 12 2024 at 14:32):
Nothing related to Polynomial is "computable" in the lean sense
Benjamin (Dec 12 2024 at 14:34):
Does this include anything related to RatFunc?
Ruben Van de Velde (Dec 12 2024 at 14:49):
Yes
Benjamin (Dec 12 2024 at 14:55):
OK, so I will have to write my own implementation then?
Kevin Buzzard (Dec 13 2024 at 03:53):
I guess that depends on what you're doing. If it includes things like "put this ratio into canonical form by cancelling common factors" then I should think so, yes.
Kevin Buzzard (Dec 13 2024 at 03:55):
In lean right now we can do "prove (x^2-1)/(x+1)=x-1 by clearing denominators" but I doubt we can do "figure out a better normal form for (x^2-1)/(x+1)"
Last updated: May 02 2025 at 03:31 UTC