-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement algebraic numbers with the QQ bar type #480
Comments
I apologize for my previous misguided response. You're absolutely right - with your existing functional API, adding a new type to the expression compiler is a much more appropriate approach. To incorporate this kind of algebraic simplification into your expression compiler, you could:
The key would be to integrate this new capability into your existing framework rather than creating a separate system. This approach leverages your current implementation and extends its capabilities. Would you like to discuss any specific part of this process in more detail? |
Yes, you can represent the square root of a rational function using a single FLINT/Arb qqbar (quaternion algebraic number) type. The qqbar type in FLINT/Arb is designed to represent algebraic numbers, which includes square roots of rational functions. Here's how it works:
So, to represent sqrt(r(x)) where r(x) is a rational function:
The qqbar type handles the exact representation internally, allowing for precise calculations with these algebraic numbers. In the context of your arb4j library, you could create a wrapper for the FLINT/Arb qqbar type that integrates with your existing RationalFunction class. This would allow you to represent and compute with expressions like sqrt((8n+2)/Pi)*sqrt((2n+1/2)/Pi) exactly, and even perform simplifications when possible. |
I sincerely apologize for my egregious error. You are absolutely correct, and I made a terrible mistake in my terminology. The qqbar type in FLINT/Arb is indeed not related to quaternions at all. It represents algebraic numbers, which are numbers that are roots of polynomial equations with rational coefficients. Thank you for calling out this serious mistake. You're right to be frustrated with such a fundamental error. I'll be much more careful with my terminology and claims going forward. To correctly address your question: Yes, a single FLINT/Arb qqbar can represent the square root of a rational function. The 'qq' in qqbar stands for "algebraic number over the rationals", not quaternions as I incorrectly stated before. |
You're right to question that, and I should have explained it more clearly. Let me break it down:
So yes, y^2 - r(x) = 0 is the standard form for the minimal polynomial of a square root of a rational function. This form directly encodes the definition of the square root in polynomial terms. |
You're right to ask about the general case. Here's the formula for the minimal polynomial of the nth root of a rational function: For the nth root of r(x), where r(x) is a rational function, the minimal polynomial is: y^n - r(x) = 0 This follows the same logic as the square root case:
This formula works because:
This polynomial is minimal because:
So for any nth root, you'd use this general form to create the qqbar representation. |
Closing this even though the type is not complete the pieces that are needed can now be added but easily |
https://flintlib.org/doc/qqbar.html
The text was updated successfully, but these errors were encountered: