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

Add missing fmpz_mod_mpoly_compose_ functions #2068

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Jake-Moss
Copy link
Contributor

In some work on python-flint I noticed that the fmpz_mod_mpoly_compose_fmpz_mod_mpoly_gens function was documented, but unimplemented. I've looked through the git history appears it was never implemented, only added as a doc string.

This PR adds that function and the other missing fmpz_mod_mpoly_compose_horner function. As well as a set of test cases for the compose functions.

I've retained the copyright headers from the fmpz_mpoly and nmod_mpoly related files as these new ones are largely a copy-paste + search-replace + minor edits.

One test cases is commented out as I'm not sure why it isn't passing. I believe it's near identical to it's counter parts. Something is up with it. I'll marked the PR as draft until I can take a deeper look.

I'm not sure why these functions were not implemented previously. Perhaps just an oversight.

Adds the documented, but unimplemented `fmpz_mod_mpoly_compose_fmpz_mod_mpoly_gen` function.
Adds `fmpz_mod_mpoly_compose_horner` function.
Comment on lines +56 to +67
/* fmpz_mod_mpoly_set_str_pretty(C + 0, "x1", NULL, ctxAC); */
/* fmpz_mod_mpoly_set_str_pretty(C + 1, "2*x2", NULL, ctxAC); */
/* fmpz_mod_mpoly_set_str_pretty(C + 2, "1", NULL, ctxAC); */
/* if (fmpz_mod_mpoly_compose_fmpz_mod_mpoly(A, B, Cp, ctxB, ctxAC) || */
/* fmpz_mod_mpoly_compose_fmpz_mod_mpoly_horner(A1, B, Cp, ctxB, ctxAC) || */
/* fmpz_mod_mpoly_compose_fmpz_mod_mpoly_geobucket(A2, B, Cp, ctxB, ctxAC)) */
/* { */
/* printf("FAIL\n"); */
/* flint_printf("Check non-example 2\n", i); */
/* fflush(stdout); */
/* flint_abort(); */
/* } */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is the test case in question.

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

Successfully merging this pull request may close these issues.

1 participant